var Y0=Object.defineProperty;var ip=r=>{throw TypeError(r)};var X0=(r,t,s)=>t in r?Y0(r,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[t]=s;var De=(r,t,s)=>X0(r,typeof t!="symbol"?t+"":t,s),Uu=(r,t,s)=>t.has(r)||ip("Cannot "+s);var C=(r,t,s)=>(Uu(r,t,"read from private field"),s?s.call(r):t.get(r)),pe=(r,t,s)=>t.has(r)?ip("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,s),ee=(r,t,s,o)=>(Uu(r,t,"write to private field"),o?o.call(r,s):t.set(r,s),s),Pe=(r,t,s)=>(Uu(r,t,"access private method"),s);var ma=(r,t,s,o)=>({set _(l){ee(r,t,l,s)},get _(){return C(r,t,o)}});function J0(r,t){for(var s=0;so[l]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))o(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function s(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(l){if(l.ep)return;l.ep=!0;const u=s(l);fetch(l.href,u)}})();function zc(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var zu={exports:{}},Oo={},Bu={exports:{}},Ce={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ap;function Z0(){if(ap)return Ce;ap=1;var r=Symbol.for("react.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function k(P){return P===null||typeof P!="object"?null:(P=v&&P[v]||P["@@iterator"],typeof P=="function"?P:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F=Object.assign,S={};function x(P,z,ce){this.props=P,this.context=z,this.refs=S,this.updater=ce||O}x.prototype.isReactComponent={},x.prototype.setState=function(P,z){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,z,"setState")},x.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function _(){}_.prototype=x.prototype;function D(P,z,ce){this.props=P,this.context=z,this.refs=S,this.updater=ce||O}var N=D.prototype=new _;N.constructor=D,F(N,x.prototype),N.isPureReactComponent=!0;var L=Array.isArray,q=Object.prototype.hasOwnProperty,$={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function B(P,z,ce){var me,he={},Y=null,ve=null;if(z!=null)for(me in z.ref!==void 0&&(ve=z.ref),z.key!==void 0&&(Y=""+z.key),z)q.call(z,me)&&!G.hasOwnProperty(me)&&(he[me]=z[me]);var Re=arguments.length-2;if(Re===1)he.children=ce;else if(1>>1,z=K[P];if(0>>1;Pl(he,U))Yl(ve,he)?(K[P]=ve,K[Y]=U,P=Y):(K[P]=he,K[me]=U,P=me);else if(Yl(ve,U))K[P]=ve,K[Y]=U,P=Y;else break e}}return ae}function l(K,ae){var U=K.sortIndex-ae.sortIndex;return U!==0?U:K.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;r.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();r.unstable_now=function(){return d.now()-h}}var p=[],m=[],y=1,v=null,k=3,O=!1,F=!1,S=!1,x=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(K){for(var ae=s(m);ae!==null;){if(ae.callback===null)o(m);else if(ae.startTime<=K)o(m),ae.sortIndex=ae.expirationTime,t(p,ae);else break;ae=s(m)}}function L(K){if(S=!1,N(K),!F)if(s(p)!==null)F=!0,_e(q);else{var ae=s(m);ae!==null&&be(L,ae.startTime-K)}}function q(K,ae){F=!1,S&&(S=!1,_(B),B=-1),O=!0;var U=k;try{for(N(ae),v=s(p);v!==null&&(!(v.expirationTime>ae)||K&&!Ee());){var P=v.callback;if(typeof P=="function"){v.callback=null,k=v.priorityLevel;var z=P(v.expirationTime<=ae);ae=r.unstable_now(),typeof z=="function"?v.callback=z:v===s(p)&&o(p),N(ae)}else o(p);v=s(p)}if(v!==null)var ce=!0;else{var me=s(m);me!==null&&be(L,me.startTime-ae),ce=!1}return ce}finally{v=null,k=U,O=!1}}var $=!1,G=null,B=-1,ie=5,ue=-1;function Ee(){return!(r.unstable_now()-ueK||125P?(K.sortIndex=U,t(m,K),s(p)===null&&K===s(m)&&(S?(_(B),B=-1):S=!0,be(L,U-P))):(K.sortIndex=z,t(p,K),F||O||(F=!0,_e(q))),K},r.unstable_shouldYield=Ee,r.unstable_wrapCallback=function(K){var ae=k;return function(){var U=k;k=ae;try{return K.apply(this,arguments)}finally{k=U}}}})(qu)),qu}var fp;function rw(){return fp||(fp=1,Vu.exports=nw()),Vu.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var hp;function sw(){if(hp)return Rt;hp=1;var r=Bc(),t=rw();function s(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,y={},v={};function k(e){return p.call(v,e)?!0:p.call(y,e)?!1:m.test(e)?v[e]=!0:(y[e]=!0,!1)}function O(e,n,i,a){if(i!==null&&i.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return a?!1:i!==null?!i.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function F(e,n,i,a){if(n===null||typeof n>"u"||O(e,n,i,a))return!0;if(a)return!1;if(i!==null)switch(i.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function S(e,n,i,a,c,f,g){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=a,this.attributeNamespace=c,this.mustUseProperty=i,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=g}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){x[e]=new S(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];x[n]=new S(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){x[e]=new S(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){x[e]=new S(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){x[e]=new S(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){x[e]=new S(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){x[e]=new S(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){x[e]=new S(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){x[e]=new S(e,5,!1,e.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function D(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(_,D);x[n]=new S(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(_,D);x[n]=new S(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(_,D);x[n]=new S(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){x[e]=new S(e,1,!1,e.toLowerCase(),null,!1,!1)}),x.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){x[e]=new S(e,1,!1,e.toLowerCase(),null,!0,!0)});function N(e,n,i,a){var c=x.hasOwnProperty(n)?x[n]:null;(c!==null?c.type!==0:a||!(2E||c[g]!==f[E]){var b=` `+c[g].replace(" at new "," at ");return e.displayName&&b.includes("")&&(b=b.replace("",e.displayName)),b}while(1<=g&&0<=E);break}}}finally{ce=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?z(e):""}function he(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=me(e.type,!1),e;case 11:return e=me(e.type.render,!1),e;case 1:return e=me(e.type,!0),e;default:return""}}function Y(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case $:return"Portal";case ie:return"Profiler";case B:return"StrictMode";case xe:return"Suspense";case J:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ee:return(e.displayName||"Context")+".Consumer";case ue:return(e._context.displayName||"Context")+".Provider";case Te:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Se:return n=e.displayName||null,n!==null?n:Y(e.type)||"Memo";case _e:n=e._payload,e=e._init;try{return Y(e(n))}catch{}}return null}function ve(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Y(n);case 8:return n===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Re(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ye(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function et(e){var n=ye(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),a=""+e[n];if(!e.hasOwnProperty(n)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var c=i.get,f=i.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(g){a=""+g,f.call(this,g)}}),Object.defineProperty(e,n,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Mt(e){e._valueTracker||(e._valueTracker=et(e))}function ot(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),a="";return e&&(a=ye(e)?e.checked?"true":"false":e.value),e=a,e!==i?(n.setValue(e),!0):!1}function Yt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ft(e,n){var i=n.checked;return U({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}function Ut(e,n){var i=n.defaultValue==null?"":n.defaultValue,a=n.checked!=null?n.checked:n.defaultChecked;i=Re(n.value!=null?n.value:i),e._wrapperState={initialChecked:a,initialValue:i,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function we(e,n){n=n.checked,n!=null&&N(e,"checked",n,!1)}function it(e,n){we(e,n);var i=Re(n.value),a=n.type;if(i!=null)a==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Jt(e,n.type,i):n.hasOwnProperty("defaultValue")&&Jt(e,n.type,Re(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Xt(e,n,i){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var a=n.type;if(!(a!=="submit"&&a!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,i||n===e.value||(e.value=n),e.defaultValue=n}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}function Jt(e,n,i){(n!=="number"||Yt(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var Mn=Array.isArray;function Fn(e,n,i,a){if(e=e.options,n){n={};for(var c=0;c"+n.valueOf().toString()+"",n=ai.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Qs(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var Ks={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ev=["Webkit","ms","Moz","O"];Object.keys(Ks).forEach(function(e){ev.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Ks[n]=Ks[e]})});function xd(e,n,i){return n==null||typeof n=="boolean"||n===""?"":i||typeof n!="number"||n===0||Ks.hasOwnProperty(e)&&Ks[e]?(""+n).trim():n+"px"}function Ed(e,n){e=e.style;for(var i in n)if(n.hasOwnProperty(i)){var a=i.indexOf("--")===0,c=xd(i,n[i],a);i==="float"&&(i="cssFloat"),a?e.setProperty(i,c):e[i]=c}}var tv=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Xa(e,n){if(n){if(tv[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(s(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(s(61))}if(n.style!=null&&typeof n.style!="object")throw Error(s(62))}}function Ja(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Za=null;function el(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tl=null,ts=null,ns=null;function _d(e){if(e=yo(e)){if(typeof tl!="function")throw Error(s(280));var n=e.stateNode;n&&(n=Ai(n),tl(e.stateNode,e.type,n))}}function Sd(e){ts?ns?ns.push(e):ns=[e]:ts=e}function bd(){if(ts){var e=ts,n=ns;if(ns=ts=null,_d(e),n)for(e=0;e>>=0,e===0?32:31-(fv(e)/hv|0)|0}var fi=64,hi=4194304;function Js(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pi(e,n){var i=e.pendingLanes;if(i===0)return 0;var a=0,c=e.suspendedLanes,f=e.pingedLanes,g=i&268435455;if(g!==0){var E=g&~c;E!==0?a=Js(E):(f&=g,f!==0&&(a=Js(f)))}else g=i&~c,g!==0?a=Js(g):f!==0&&(a=Js(f));if(a===0)return 0;if(n!==0&&n!==a&&(n&c)===0&&(c=a&-a,f=n&-n,c>=f||c===16&&(f&4194240)!==0))return n;if((a&4)!==0&&(a|=i&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=a;0i;i++)n.push(e);return n}function Zs(e,n,i){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Zt(n),e[n]=i}function yv(e,n){var i=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var a=e.eventTimes;for(e=e.expirationTimes;0=ao),Jd=" ",Zd=!1;function ef(e,n){switch(e){case"keyup":return Hv.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var os=!1;function Qv(e,n){switch(e){case"compositionend":return tf(n);case"keypress":return n.which!==32?null:(Zd=!0,Jd);case"textInput":return e=n.data,e===Jd&&Zd?null:e;default:return null}}function Kv(e,n){if(os)return e==="compositionend"||!wl&&ef(e,n)?(e=Wd(),wi=hl=Vn=null,os=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:i,offset:n-e};e=a}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=uf(i)}}function df(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?df(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function ff(){for(var e=window,n=Yt();n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=Yt(e.document)}return n}function _l(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function r0(e){var n=ff(),i=e.focusedElem,a=e.selectionRange;if(n!==i&&i&&i.ownerDocument&&df(i.ownerDocument.documentElement,i)){if(a!==null&&_l(i)){if(n=a.start,e=a.end,e===void 0&&(e=n),"selectionStart"in i)i.selectionStart=n,i.selectionEnd=Math.min(e,i.value.length);else if(e=(n=i.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var c=i.textContent.length,f=Math.min(a.start,c);a=a.end===void 0?f:Math.min(a.end,c),!e.extend&&f>a&&(c=a,a=f,f=c),c=cf(i,f);var g=cf(i,a);c&&g&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==g.node||e.focusOffset!==g.offset)&&(n=n.createRange(),n.setStart(c.node,c.offset),e.removeAllRanges(),f>a?(e.addRange(n),e.extend(g.node,g.offset)):(n.setEnd(g.node,g.offset),e.addRange(n)))}}for(n=[],e=i;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i=document.documentMode,is=null,Sl=null,fo=null,bl=!1;function hf(e,n,i){var a=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;bl||is==null||is!==Yt(a)||(a=is,"selectionStart"in a&&_l(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),fo&&co(fo,a)||(fo=a,a=Ri(Sl,"onSelect"),0ds||(e.current=Il[ds],Il[ds]=null,ds--)}function Fe(e,n){ds++,Il[ds]=e.current,e.current=n}var Qn={},ft=Wn(Qn),_t=Wn(!1),_r=Qn;function fs(e,n){var i=e.type.contextTypes;if(!i)return Qn;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===n)return a.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in i)c[f]=n[f];return a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=c),c}function St(e){return e=e.childContextTypes,e!=null}function Ni(){ze(_t),ze(ft)}function Tf(e,n,i){if(ft.current!==Qn)throw Error(s(168));Fe(ft,n),Fe(_t,i)}function Pf(e,n,i){var a=e.stateNode;if(n=n.childContextTypes,typeof a.getChildContext!="function")return i;a=a.getChildContext();for(var c in a)if(!(c in n))throw Error(s(108,ve(e)||"Unknown",c));return U({},i,a)}function Oi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qn,_r=ft.current,Fe(ft,e),Fe(_t,_t.current),!0}function Af(e,n,i){var a=e.stateNode;if(!a)throw Error(s(169));i?(e=Pf(e,n,_r),a.__reactInternalMemoizedMergedChildContext=e,ze(_t),ze(ft),Fe(ft,e)):ze(_t),Fe(_t,i)}var kn=null,Li=!1,Ml=!1;function Nf(e){kn===null?kn=[e]:kn.push(e)}function m0(e){Li=!0,Nf(e)}function Kn(){if(!Ml&&kn!==null){Ml=!0;var e=0,n=Ie;try{var i=kn;for(Ie=1;e>=g,c-=g,Cn=1<<32-Zt(n)+c|i<ge?(rt=fe,fe=null):rt=fe.sibling;var Le=V(j,fe,I[ge],Q);if(Le===null){fe===null&&(fe=rt);break}e&&fe&&Le.alternate===null&&n(j,fe),T=f(Le,T,ge),de===null?le=Le:de.sibling=Le,de=Le,fe=rt}if(ge===I.length)return i(j,fe),Be&&br(j,ge),le;if(fe===null){for(;gege?(rt=fe,fe=null):rt=fe.sibling;var rr=V(j,fe,Le.value,Q);if(rr===null){fe===null&&(fe=rt);break}e&&fe&&rr.alternate===null&&n(j,fe),T=f(rr,T,ge),de===null?le=rr:de.sibling=rr,de=rr,fe=rt}if(Le.done)return i(j,fe),Be&&br(j,ge),le;if(fe===null){for(;!Le.done;ge++,Le=I.next())Le=W(j,Le.value,Q),Le!==null&&(T=f(Le,T,ge),de===null?le=Le:de.sibling=Le,de=Le);return Be&&br(j,ge),le}for(fe=a(j,fe);!Le.done;ge++,Le=I.next())Le=Z(fe,j,ge,Le.value,Q),Le!==null&&(e&&Le.alternate!==null&&fe.delete(Le.key===null?ge:Le.key),T=f(Le,T,ge),de===null?le=Le:de.sibling=Le,de=Le);return e&&fe.forEach(function(G0){return n(j,G0)}),Be&&br(j,ge),le}function Qe(j,T,I,Q){if(typeof I=="object"&&I!==null&&I.type===G&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case q:e:{for(var le=I.key,de=T;de!==null;){if(de.key===le){if(le=I.type,le===G){if(de.tag===7){i(j,de.sibling),T=c(de,I.props.children),T.return=j,j=T;break e}}else if(de.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===_e&&Mf(le)===de.type){i(j,de.sibling),T=c(de,I.props),T.ref=vo(j,de,I),T.return=j,j=T;break e}i(j,de);break}else n(j,de);de=de.sibling}I.type===G?(T=Or(I.props.children,j.mode,Q,I.key),T.return=j,j=T):(Q=aa(I.type,I.key,I.props,null,j.mode,Q),Q.ref=vo(j,T,I),Q.return=j,j=Q)}return g(j);case $:e:{for(de=I.key;T!==null;){if(T.key===de)if(T.tag===4&&T.stateNode.containerInfo===I.containerInfo&&T.stateNode.implementation===I.implementation){i(j,T.sibling),T=c(T,I.children||[]),T.return=j,j=T;break e}else{i(j,T);break}else n(j,T);T=T.sibling}T=Du(I,j.mode,Q),T.return=j,j=T}return g(j);case _e:return de=I._init,Qe(j,T,de(I._payload),Q)}if(Mn(I))return ne(j,T,I,Q);if(ae(I))return oe(j,T,I,Q);Mi(j,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,T!==null&&T.tag===6?(i(j,T.sibling),T=c(T,I),T.return=j,j=T):(i(j,T),T=Lu(I,j.mode,Q),T.return=j,j=T),g(j)):i(j,T)}return Qe}var gs=Ff(!0),Uf=Ff(!1),Fi=Wn(null),Ui=null,ys=null,Vl=null;function ql(){Vl=ys=Ui=null}function Hl(e){var n=Fi.current;ze(Fi),e._currentValue=n}function Wl(e,n,i){for(;e!==null;){var a=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,a!==null&&(a.childLanes|=n)):a!==null&&(a.childLanes&n)!==n&&(a.childLanes|=n),e===i)break;e=e.return}}function vs(e,n){Ui=e,Vl=ys=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(bt=!0),e.firstContext=null)}function $t(e){var n=e._currentValue;if(Vl!==e)if(e={context:e,memoizedValue:n,next:null},ys===null){if(Ui===null)throw Error(s(308));ys=e,Ui.dependencies={lanes:0,firstContext:e}}else ys=ys.next=e;return n}var kr=null;function Ql(e){kr===null?kr=[e]:kr.push(e)}function zf(e,n,i,a){var c=n.interleaved;return c===null?(i.next=i,Ql(n)):(i.next=c.next,c.next=i),n.interleaved=i,Tn(e,a)}function Tn(e,n){e.lanes|=n;var i=e.alternate;for(i!==null&&(i.lanes|=n),i=e,e=e.return;e!==null;)e.childLanes|=n,i=e.alternate,i!==null&&(i.childLanes|=n),i=e,e=e.return;return i.tag===3?i.stateNode:null}var Gn=!1;function Kl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bf(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Pn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Yn(e,n,i){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Oe&2)!==0){var c=a.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),a.pending=n,Tn(e,i)}return c=a.interleaved,c===null?(n.next=n,Ql(a)):(n.next=c.next,c.next=n),a.interleaved=n,Tn(e,i)}function zi(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194240)!==0)){var a=n.lanes;a&=e.pendingLanes,i|=a,n.lanes=i,ll(e,i)}}function $f(e,n){var i=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,i===a)){var c=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var g={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};f===null?c=f=g:f=f.next=g,i=i.next}while(i!==null);f===null?c=f=n:f=f.next=n}else c=f=n;i={baseState:a.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:a.shared,effects:a.effects},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}function Bi(e,n,i,a){var c=e.updateQueue;Gn=!1;var f=c.firstBaseUpdate,g=c.lastBaseUpdate,E=c.shared.pending;if(E!==null){c.shared.pending=null;var b=E,M=b.next;b.next=null,g===null?f=M:g.next=M,g=b;var H=e.alternate;H!==null&&(H=H.updateQueue,E=H.lastBaseUpdate,E!==g&&(E===null?H.firstBaseUpdate=M:E.next=M,H.lastBaseUpdate=b))}if(f!==null){var W=c.baseState;g=0,H=M=b=null,E=f;do{var V=E.lane,Z=E.eventTime;if((a&V)===V){H!==null&&(H=H.next={eventTime:Z,lane:0,tag:E.tag,payload:E.payload,callback:E.callback,next:null});e:{var ne=e,oe=E;switch(V=n,Z=i,oe.tag){case 1:if(ne=oe.payload,typeof ne=="function"){W=ne.call(Z,W,V);break e}W=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=oe.payload,V=typeof ne=="function"?ne.call(Z,W,V):ne,V==null)break e;W=U({},W,V);break e;case 2:Gn=!0}}E.callback!==null&&E.lane!==0&&(e.flags|=64,V=c.effects,V===null?c.effects=[E]:V.push(E))}else Z={eventTime:Z,lane:V,tag:E.tag,payload:E.payload,callback:E.callback,next:null},H===null?(M=H=Z,b=W):H=H.next=Z,g|=V;if(E=E.next,E===null){if(E=c.shared.pending,E===null)break;V=E,E=V.next,V.next=null,c.lastBaseUpdate=V,c.shared.pending=null}}while(!0);if(H===null&&(b=W),c.baseState=b,c.firstBaseUpdate=M,c.lastBaseUpdate=H,n=c.shared.interleaved,n!==null){c=n;do g|=c.lane,c=c.next;while(c!==n)}else f===null&&(c.shared.lanes=0);Tr|=g,e.lanes=g,e.memoizedState=W}}function Vf(e,n,i){if(e=n.effects,n.effects=null,e!==null)for(n=0;ni?i:4,e(!0);var a=Zl.transition;Zl.transition={};try{e(!1),n()}finally{Ie=i,Zl.transition=a}}function lh(){return Vt().memoizedState}function w0(e,n,i){var a=er(e);if(i={lane:a,action:i,hasEagerState:!1,eagerState:null,next:null},uh(e))ch(n,i);else if(i=zf(e,n,i,a),i!==null){var c=xt();on(i,e,a,c),dh(i,n,a)}}function x0(e,n,i){var a=er(e),c={lane:a,action:i,hasEagerState:!1,eagerState:null,next:null};if(uh(e))ch(n,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var g=n.lastRenderedState,E=f(g,i);if(c.hasEagerState=!0,c.eagerState=E,en(E,g)){var b=n.interleaved;b===null?(c.next=c,Ql(n)):(c.next=b.next,b.next=c),n.interleaved=c;return}}catch{}finally{}i=zf(e,n,c,a),i!==null&&(c=xt(),on(i,e,a,c),dh(i,n,a))}}function uh(e){var n=e.alternate;return e===Ve||n!==null&&n===Ve}function ch(e,n){_o=qi=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function dh(e,n,i){if((i&4194240)!==0){var a=n.lanes;a&=e.pendingLanes,i|=a,n.lanes=i,ll(e,i)}}var Qi={readContext:$t,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useInsertionEffect:ht,useLayoutEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useMutableSource:ht,useSyncExternalStore:ht,useId:ht,unstable_isNewReconciler:!1},E0={readContext:$t,useCallback:function(e,n){return pn().memoizedState=[e,n===void 0?null:n],e},useContext:$t,useEffect:eh,useImperativeHandle:function(e,n,i){return i=i!=null?i.concat([e]):null,Hi(4194308,4,rh.bind(null,n,e),i)},useLayoutEffect:function(e,n){return Hi(4194308,4,e,n)},useInsertionEffect:function(e,n){return Hi(4,2,e,n)},useMemo:function(e,n){var i=pn();return n=n===void 0?null:n,e=e(),i.memoizedState=[e,n],e},useReducer:function(e,n,i){var a=pn();return n=i!==void 0?i(n):n,a.memoizedState=a.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=w0.bind(null,Ve,e),[a.memoizedState,e]},useRef:function(e){var n=pn();return e={current:e},n.memoizedState=e},useState:Jf,useDebugValue:iu,useDeferredValue:function(e){return pn().memoizedState=e},useTransition:function(){var e=Jf(!1),n=e[0];return e=v0.bind(null,e[1]),pn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,i){var a=Ve,c=pn();if(Be){if(i===void 0)throw Error(s(407));i=i()}else{if(i=n(),nt===null)throw Error(s(349));(Rr&30)!==0||Qf(a,n,i)}c.memoizedState=i;var f={value:i,getSnapshot:n};return c.queue=f,eh(Gf.bind(null,a,f,e),[e]),a.flags|=2048,ko(9,Kf.bind(null,a,f,i,n),void 0,null),i},useId:function(){var e=pn(),n=nt.identifierPrefix;if(Be){var i=Rn,a=Cn;i=(a&~(1<<32-Zt(a)-1)).toString(32)+i,n=":"+n+"R"+i,i=So++,0<\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=g.createElement(i,{is:a.is}):(e=g.createElement(i),i==="select"&&(g=e,a.multiple?g.multiple=!0:a.size&&(g.size=a.size))):e=g.createElementNS(e,i),e[fn]=n,e[go]=a,Nh(e,n,!1,!1),n.stateNode=e;e:{switch(g=Ja(i,a),i){case"dialog":Ue("cancel",e),Ue("close",e),c=a;break;case"iframe":case"object":case"embed":Ue("load",e),c=a;break;case"video":case"audio":for(c=0;cSs&&(n.flags|=128,a=!0,Co(f,!1),n.lanes=4194304)}else{if(!a)if(e=$i(g),e!==null){if(n.flags|=128,a=!0,i=e.updateQueue,i!==null&&(n.updateQueue=i,n.flags|=4),Co(f,!0),f.tail===null&&f.tailMode==="hidden"&&!g.alternate&&!Be)return pt(n),null}else 2*We()-f.renderingStartTime>Ss&&i!==1073741824&&(n.flags|=128,a=!0,Co(f,!1),n.lanes=4194304);f.isBackwards?(g.sibling=n.child,n.child=g):(i=f.last,i!==null?i.sibling=g:n.child=g,f.last=g)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=We(),n.sibling=null,i=$e.current,Fe($e,a?i&1|2:i&1),n):(pt(n),null);case 22:case 23:return Au(),a=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==a&&(n.flags|=8192),a&&(n.mode&1)!==0?(jt&1073741824)!==0&&(pt(n),n.subtreeFlags&6&&(n.flags|=8192)):pt(n),null;case 24:return null;case 25:return null}throw Error(s(156,n.tag))}function P0(e,n){switch(Ul(n),n.tag){case 1:return St(n.type)&&Ni(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ws(),ze(_t),ze(ft),Jl(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return Yl(n),null;case 13:if(ze($e),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(s(340));ms()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return ze($e),null;case 4:return ws(),null;case 10:return Hl(n.type._context),null;case 22:case 23:return Au(),null;case 24:return null;default:return null}}var Xi=!1,mt=!1,A0=typeof WeakSet=="function"?WeakSet:Set,te=null;function Es(e,n){var i=e.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(a){qe(e,n,a)}else i.current=null}function vu(e,n,i){try{i()}catch(a){qe(e,n,a)}}var Dh=!1;function N0(e,n){if(Al=yi,e=ff(),_l(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var a=i.getSelection&&i.getSelection();if(a&&a.rangeCount!==0){i=a.anchorNode;var c=a.anchorOffset,f=a.focusNode;a=a.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var g=0,E=-1,b=-1,M=0,H=0,W=e,V=null;t:for(;;){for(var Z;W!==i||c!==0&&W.nodeType!==3||(E=g+c),W!==f||a!==0&&W.nodeType!==3||(b=g+a),W.nodeType===3&&(g+=W.nodeValue.length),(Z=W.firstChild)!==null;)V=W,W=Z;for(;;){if(W===e)break t;if(V===i&&++M===c&&(E=g),V===f&&++H===a&&(b=g),(Z=W.nextSibling)!==null)break;W=V,V=W.parentNode}W=Z}i=E===-1||b===-1?null:{start:E,end:b}}else i=null}i=i||{start:0,end:0}}else i=null;for(Nl={focusedElem:e,selectionRange:i},yi=!1,te=n;te!==null;)if(n=te,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,te=e;else for(;te!==null;){n=te;try{var ne=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(ne!==null){var oe=ne.memoizedProps,Qe=ne.memoizedState,j=n.stateNode,T=j.getSnapshotBeforeUpdate(n.elementType===n.type?oe:nn(n.type,oe),Qe);j.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var I=n.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Q){qe(n,n.return,Q)}if(e=n.sibling,e!==null){e.return=n.return,te=e;break}te=n.return}return ne=Dh,Dh=!1,ne}function Ro(e,n,i){var a=n.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var c=a=a.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&vu(n,i,f)}c=c.next}while(c!==a)}}function Ji(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.create;i.destroy=a()}i=i.next}while(i!==n)}}function wu(e){var n=e.ref;if(n!==null){var i=e.stateNode;switch(e.tag){case 5:e=i;break;default:e=i}typeof n=="function"?n(e):n.current=e}}function jh(e){var n=e.alternate;n!==null&&(e.alternate=null,jh(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[fn],delete n[go],delete n[jl],delete n[h0],delete n[p0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ih(e){return e.tag===5||e.tag===3||e.tag===4}function Mh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ih(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xu(e,n,i){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?i.nodeType===8?i.parentNode.insertBefore(e,n):i.insertBefore(e,n):(i.nodeType===8?(n=i.parentNode,n.insertBefore(e,i)):(n=i,n.appendChild(e)),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=Pi));else if(a!==4&&(e=e.child,e!==null))for(xu(e,n,i),e=e.sibling;e!==null;)xu(e,n,i),e=e.sibling}function Eu(e,n,i){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(Eu(e,n,i),e=e.sibling;e!==null;)Eu(e,n,i),e=e.sibling}var at=null,rn=!1;function Xn(e,n,i){for(i=i.child;i!==null;)Fh(e,n,i),i=i.sibling}function Fh(e,n,i){if(dn&&typeof dn.onCommitFiberUnmount=="function")try{dn.onCommitFiberUnmount(di,i)}catch{}switch(i.tag){case 5:mt||Es(i,n);case 6:var a=at,c=rn;at=null,Xn(e,n,i),at=a,rn=c,at!==null&&(rn?(e=at,i=i.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)):at.removeChild(i.stateNode));break;case 18:at!==null&&(rn?(e=at,i=i.stateNode,e.nodeType===8?Dl(e.parentNode,i):e.nodeType===1&&Dl(e,i),so(e)):Dl(at,i.stateNode));break;case 4:a=at,c=rn,at=i.stateNode.containerInfo,rn=!0,Xn(e,n,i),at=a,rn=c;break;case 0:case 11:case 14:case 15:if(!mt&&(a=i.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){c=a=a.next;do{var f=c,g=f.destroy;f=f.tag,g!==void 0&&((f&2)!==0||(f&4)!==0)&&vu(i,n,g),c=c.next}while(c!==a)}Xn(e,n,i);break;case 1:if(!mt&&(Es(i,n),a=i.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=i.memoizedProps,a.state=i.memoizedState,a.componentWillUnmount()}catch(E){qe(i,n,E)}Xn(e,n,i);break;case 21:Xn(e,n,i);break;case 22:i.mode&1?(mt=(a=mt)||i.memoizedState!==null,Xn(e,n,i),mt=a):Xn(e,n,i);break;default:Xn(e,n,i)}}function Uh(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new A0),n.forEach(function(a){var c=z0.bind(null,e,a);i.has(a)||(i.add(a),a.then(c,c))})}}function sn(e,n){var i=n.deletions;if(i!==null)for(var a=0;ac&&(c=g),a&=~f}if(a=c,a=We()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*L0(a/1960))-a,10e?16:e,Zn===null)var a=!1;else{if(e=Zn,Zn=null,ra=0,(Oe&6)!==0)throw Error(s(331));var c=Oe;for(Oe|=4,te=e.current;te!==null;){var f=te,g=f.child;if((te.flags&16)!==0){var E=f.deletions;if(E!==null){for(var b=0;bWe()-bu?Ar(e,0):Su|=i),Ct(e,n)}function Jh(e,n){n===0&&((e.mode&1)===0?n=1:(n=hi,hi<<=1,(hi&130023424)===0&&(hi=4194304)));var i=xt();e=Tn(e,n),e!==null&&(Zs(e,n,i),Ct(e,i))}function U0(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),Jh(e,i)}function z0(e,n){var i=0;switch(e.tag){case 13:var a=e.stateNode,c=e.memoizedState;c!==null&&(i=c.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(s(314))}a!==null&&a.delete(n),Jh(e,i)}var Zh;Zh=function(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps||_t.current)bt=!0;else{if((e.lanes&i)===0&&(n.flags&128)===0)return bt=!1,R0(e,n,i);bt=(e.flags&131072)!==0}else bt=!1,Be&&(n.flags&1048576)!==0&&Of(n,ji,n.index);switch(n.lanes=0,n.tag){case 2:var a=n.type;Yi(e,n),e=n.pendingProps;var c=fs(n,ft.current);vs(n,i),c=tu(null,n,a,e,c,i);var f=nu();return n.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,St(a)?(f=!0,Oi(n)):f=!1,n.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Kl(n),c.updater=Ki,n.stateNode=c,c._reactInternals=n,lu(n,a,e,i),n=fu(null,n,a,!0,f,i)):(n.tag=0,Be&&f&&Fl(n),wt(null,n,c,i),n=n.child),n;case 16:a=n.elementType;e:{switch(Yi(e,n),e=n.pendingProps,c=a._init,a=c(a._payload),n.type=a,c=n.tag=$0(a),e=nn(a,e),c){case 0:n=du(null,n,a,e,i);break e;case 1:n=kh(null,n,a,e,i);break e;case 11:n=xh(null,n,a,e,i);break e;case 14:n=Eh(null,n,a,nn(a.type,e),i);break e}throw Error(s(306,a,""))}return n;case 0:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:nn(a,c),du(e,n,a,c,i);case 1:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:nn(a,c),kh(e,n,a,c,i);case 3:e:{if(Ch(n),e===null)throw Error(s(387));a=n.pendingProps,f=n.memoizedState,c=f.element,Bf(e,n),Bi(n,a,null,i);var g=n.memoizedState;if(a=g.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){c=xs(Error(s(423)),n),n=Rh(e,n,a,i,c);break e}else if(a!==c){c=xs(Error(s(424)),n),n=Rh(e,n,a,i,c);break e}else for(Dt=Hn(n.stateNode.containerInfo.firstChild),Lt=n,Be=!0,tn=null,i=Uf(n,null,a,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ms(),a===c){n=An(e,n,i);break e}wt(e,n,a,i)}n=n.child}return n;case 5:return qf(n),e===null&&Bl(n),a=n.type,c=n.pendingProps,f=e!==null?e.memoizedProps:null,g=c.children,Ol(a,c)?g=null:f!==null&&Ol(a,f)&&(n.flags|=32),bh(e,n),wt(e,n,g,i),n.child;case 6:return e===null&&Bl(n),null;case 13:return Th(e,n,i);case 4:return Gl(n,n.stateNode.containerInfo),a=n.pendingProps,e===null?n.child=gs(n,null,a,i):wt(e,n,a,i),n.child;case 11:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:nn(a,c),xh(e,n,a,c,i);case 7:return wt(e,n,n.pendingProps,i),n.child;case 8:return wt(e,n,n.pendingProps.children,i),n.child;case 12:return wt(e,n,n.pendingProps.children,i),n.child;case 10:e:{if(a=n.type._context,c=n.pendingProps,f=n.memoizedProps,g=c.value,Fe(Fi,a._currentValue),a._currentValue=g,f!==null)if(en(f.value,g)){if(f.children===c.children&&!_t.current){n=An(e,n,i);break e}}else for(f=n.child,f!==null&&(f.return=n);f!==null;){var E=f.dependencies;if(E!==null){g=f.child;for(var b=E.firstContext;b!==null;){if(b.context===a){if(f.tag===1){b=Pn(-1,i&-i),b.tag=2;var M=f.updateQueue;if(M!==null){M=M.shared;var H=M.pending;H===null?b.next=b:(b.next=H.next,H.next=b),M.pending=b}}f.lanes|=i,b=f.alternate,b!==null&&(b.lanes|=i),Wl(f.return,i,n),E.lanes|=i;break}b=b.next}}else if(f.tag===10)g=f.type===n.type?null:f.child;else if(f.tag===18){if(g=f.return,g===null)throw Error(s(341));g.lanes|=i,E=g.alternate,E!==null&&(E.lanes|=i),Wl(g,i,n),g=f.sibling}else g=f.child;if(g!==null)g.return=f;else for(g=f;g!==null;){if(g===n){g=null;break}if(f=g.sibling,f!==null){f.return=g.return,g=f;break}g=g.return}f=g}wt(e,n,c.children,i),n=n.child}return n;case 9:return c=n.type,a=n.pendingProps.children,vs(n,i),c=$t(c),a=a(c),n.flags|=1,wt(e,n,a,i),n.child;case 14:return a=n.type,c=nn(a,n.pendingProps),c=nn(a.type,c),Eh(e,n,a,c,i);case 15:return _h(e,n,n.type,n.pendingProps,i);case 17:return a=n.type,c=n.pendingProps,c=n.elementType===a?c:nn(a,c),Yi(e,n),n.tag=1,St(a)?(e=!0,Oi(n)):e=!1,vs(n,i),hh(n,a,c),lu(n,a,c,i),fu(null,n,a,!0,e,i);case 19:return Ah(e,n,i);case 22:return Sh(e,n,i)}throw Error(s(156,n.tag))};function ep(e,n){return Od(e,n)}function B0(e,n,i,a){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ht(e,n,i,a){return new B0(e,n,i,a)}function Ou(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $0(e){if(typeof e=="function")return Ou(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Te)return 11;if(e===Se)return 14}return 2}function nr(e,n){var i=e.alternate;return i===null?(i=Ht(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&14680064,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function aa(e,n,i,a,c,f){var g=2;if(a=e,typeof e=="function")Ou(e)&&(g=1);else if(typeof e=="string")g=5;else e:switch(e){case G:return Or(i.children,c,f,n);case B:g=8,c|=8;break;case ie:return e=Ht(12,i,n,c|2),e.elementType=ie,e.lanes=f,e;case xe:return e=Ht(13,i,n,c),e.elementType=xe,e.lanes=f,e;case J:return e=Ht(19,i,n,c),e.elementType=J,e.lanes=f,e;case be:return la(i,c,f,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ue:g=10;break e;case Ee:g=9;break e;case Te:g=11;break e;case Se:g=14;break e;case _e:g=16,a=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return n=Ht(g,i,n,c),n.elementType=e,n.type=a,n.lanes=f,n}function Or(e,n,i,a){return e=Ht(7,e,a,n),e.lanes=i,e}function la(e,n,i,a){return e=Ht(22,e,a,n),e.elementType=be,e.lanes=i,e.stateNode={isHidden:!1},e}function Lu(e,n,i){return e=Ht(6,e,null,n),e.lanes=i,e}function Du(e,n,i){return n=Ht(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function V0(e,n,i,a,c){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=al(0),this.expirationTimes=al(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=al(0),this.identifierPrefix=a,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function ju(e,n,i,a,c,f,g,E,b){return e=new V0(e,n,i,E,b),n===1?(n=1,f===!0&&(n|=8)):n=0,f=Ht(3,null,null,n),e.current=f,f.stateNode=e,f.memoizedState={element:a,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},Kl(f),e}function q0(e,n,i){var a=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(t){console.error(t)}}return r(),$u.exports=sw(),$u.exports}var mp;function ow(){if(mp)return ga;mp=1;var r=Qm();return ga.createRoot=r.createRoot,ga.hydrateRoot=r.hydrateRoot,ga}var iw=ow();const aw=zc(iw),lw=20,uw=1e6,In={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Hu=0;function cw(){return Hu=(Hu+1)%Number.MAX_VALUE,Hu.toString()}const Wu=new Map,gp=r=>{if(Wu.has(r))return;const t=setTimeout(()=>{Wu.delete(r),Vo({type:In.REMOVE_TOAST,toastId:r})},uw);Wu.set(r,t)},dw=(r,t)=>{switch(t.type){case In.ADD_TOAST:return{...r,toasts:[t.toast,...r.toasts].slice(0,lw)};case In.UPDATE_TOAST:return{...r,toasts:r.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case In.DISMISS_TOAST:{const{toastId:s}=t;return s?gp(s):r.toasts.forEach(o=>{gp(o.id)}),{...r,toasts:r.toasts.map(o=>o.id===s||s===void 0?{...o,open:!1}:o)}}case In.REMOVE_TOAST:return t.toastId===void 0?{...r,toasts:[]}:{...r,toasts:r.toasts.filter(s=>s.id!==t.toastId)}}},Ca=[];let Ra={toasts:[]};function Vo(r){Ra=dw(Ra,r),Ca.forEach(t=>{t(Ra)})}function fw({...r}){const t=cw(),s=l=>Vo({type:In.UPDATE_TOAST,toast:{...l,id:t}}),o=()=>Vo({type:In.DISMISS_TOAST,toastId:t});return Vo({type:In.ADD_TOAST,toast:{...r,id:t,open:!0,onOpenChange:l=>{l||o()}}}),{id:t,dismiss:o,update:s}}function hw(){const[r,t]=R.useState(Ra);return R.useEffect(()=>(Ca.push(t),()=>{const s=Ca.indexOf(t);s>-1&&Ca.splice(s,1)}),[r]),{...r,toast:fw,dismiss:s=>Vo({type:In.DISMISS_TOAST,toastId:s})}}var $c=Qm();const pw=zc($c);function It(r,t,{checkForDefaultPrevented:s=!0}={}){return function(l){if(r==null||r(l),s===!1||!l.defaultPrevented)return t==null?void 0:t(l)}}function yp(r,t){if(typeof r=="function")return r(t);r!=null&&(r.current=t)}function Vc(...r){return t=>{let s=!1;const o=r.map(l=>{const u=yp(l,t);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let l=0;l{var _;const{scope:k,children:O,...F}=v,S=((_=k==null?void 0:k[r])==null?void 0:_[p])||h,x=R.useMemo(()=>F,Object.values(F));return w.jsx(S.Provider,{value:x,children:O})};m.displayName=u+"Provider";function y(v,k){var S;const O=((S=k==null?void 0:k[r])==null?void 0:S[p])||h,F=R.useContext(O);if(F)return F;if(d!==void 0)return d;throw new Error(`\`${v}\` must be used within \`${u}\``)}return[m,y]}const l=()=>{const u=s.map(d=>R.createContext(d));return function(h){const p=(h==null?void 0:h[r])||u;return R.useMemo(()=>({[`__scope${r}`]:{...h,[r]:p}}),[h,p])}};return l.scopeName=r,[o,mw(l,...t)]}function mw(...r){const t=r[0];if(r.length===1)return t;const s=()=>{const o=r.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(u){const d=o.reduce((h,{useScope:p,scopeName:m})=>{const v=p(u)[`__scope${m}`];return{...h,...v}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return s.scopeName=t.scopeName,s}function vp(r){const t=gw(r),s=R.forwardRef((o,l)=>{const{children:u,...d}=o,h=R.Children.toArray(u),p=h.find(vw);if(p){const m=p.props.children,y=h.map(v=>v===p?R.Children.count(m)>1?R.Children.only(null):R.isValidElement(m)?m.props.children:null:v);return w.jsx(t,{...d,ref:l,children:R.isValidElement(m)?R.cloneElement(m,void 0,y):null})}return w.jsx(t,{...d,ref:l,children:u})});return s.displayName=`${r}.Slot`,s}function gw(r){const t=R.forwardRef((s,o)=>{const{children:l,...u}=s;if(R.isValidElement(l)){const d=xw(l),h=ww(u,l.props);return l.type!==R.Fragment&&(h.ref=o?Vc(o,d):d),R.cloneElement(l,h)}return R.Children.count(l)>1?R.Children.only(null):null});return t.displayName=`${r}.SlotClone`,t}var yw=Symbol("radix.slottable");function vw(r){return R.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===yw}function ww(r,t){const s={...t};for(const o in t){const l=r[o],u=t[o];/^on[A-Z]/.test(o)?l&&u?s[o]=(...h)=>{const p=u(...h);return l(...h),p}:l&&(s[o]=l):o==="style"?s[o]={...l,...u}:o==="className"&&(s[o]=[l,u].filter(Boolean).join(" "))}return{...r,...s}}function xw(r){var o,l;let t=(o=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?r.ref:(t=(l=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:l.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?r.props.ref:r.props.ref||r.ref)}function Ew(r){const t=r+"CollectionProvider",[s,o]=Km(t),[l,u]=s(t,{collectionRef:{current:null},itemMap:new Map}),d=S=>{const{scope:x,children:_}=S,D=ir.useRef(null),N=ir.useRef(new Map).current;return w.jsx(l,{scope:x,itemMap:N,collectionRef:D,children:_})};d.displayName=t;const h=r+"CollectionSlot",p=vp(h),m=ir.forwardRef((S,x)=>{const{scope:_,children:D}=S,N=u(h,_),L=Gr(x,N.collectionRef);return w.jsx(p,{ref:L,children:D})});m.displayName=h;const y=r+"CollectionItemSlot",v="data-radix-collection-item",k=vp(y),O=ir.forwardRef((S,x)=>{const{scope:_,children:D,...N}=S,L=ir.useRef(null),q=Gr(x,L),$=u(y,_);return ir.useEffect(()=>($.itemMap.set(L,{ref:L,...N}),()=>void $.itemMap.delete(L))),w.jsx(k,{[v]:"",ref:q,children:D})});O.displayName=y;function F(S){const x=u(r+"CollectionConsumer",S);return ir.useCallback(()=>{const D=x.collectionRef.current;if(!D)return[];const N=Array.from(D.querySelectorAll(`[${v}]`));return Array.from(x.itemMap.values()).sort(($,G)=>N.indexOf($.ref.current)-N.indexOf(G.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:d,Slot:m,ItemSlot:O},F,o]}function _w(r){const t=Sw(r),s=R.forwardRef((o,l)=>{const{children:u,...d}=o,h=R.Children.toArray(u),p=h.find(kw);if(p){const m=p.props.children,y=h.map(v=>v===p?R.Children.count(m)>1?R.Children.only(null):R.isValidElement(m)?m.props.children:null:v);return w.jsx(t,{...d,ref:l,children:R.isValidElement(m)?R.cloneElement(m,void 0,y):null})}return w.jsx(t,{...d,ref:l,children:u})});return s.displayName=`${r}.Slot`,s}function Sw(r){const t=R.forwardRef((s,o)=>{const{children:l,...u}=s;if(R.isValidElement(l)){const d=Rw(l),h=Cw(u,l.props);return l.type!==R.Fragment&&(h.ref=o?Vc(o,d):d),R.cloneElement(l,h)}return R.Children.count(l)>1?R.Children.only(null):null});return t.displayName=`${r}.SlotClone`,t}var bw=Symbol("radix.slottable");function kw(r){return R.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===bw}function Cw(r,t){const s={...t};for(const o in t){const l=r[o],u=t[o];/^on[A-Z]/.test(o)?l&&u?s[o]=(...h)=>{const p=u(...h);return l(...h),p}:l&&(s[o]=l):o==="style"?s[o]={...l,...u}:o==="className"&&(s[o]=[l,u].filter(Boolean).join(" "))}return{...r,...s}}function Rw(r){var o,l;let t=(o=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?r.ref:(t=(l=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:l.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?r.props.ref:r.props.ref||r.ref)}var Tw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_n=Tw.reduce((r,t)=>{const s=_w(`Primitive.${t}`),o=R.forwardRef((l,u)=>{const{asChild:d,...h}=l,p=d?s:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(p,{...h,ref:u})});return o.displayName=`Primitive.${t}`,{...r,[t]:o}},{});function Gm(r,t){r&&$c.flushSync(()=>r.dispatchEvent(t))}function Yr(r){const t=R.useRef(r);return R.useEffect(()=>{t.current=r}),R.useMemo(()=>(...s)=>{var o;return(o=t.current)==null?void 0:o.call(t,...s)},[])}function Pw(r,t=globalThis==null?void 0:globalThis.document){const s=Yr(r);R.useEffect(()=>{const o=l=>{l.key==="Escape"&&s(l)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[s,t])}var Aw="DismissableLayer",lc="dismissableLayer.update",Nw="dismissableLayer.pointerDownOutside",Ow="dismissableLayer.focusOutside",wp,Ym=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xm=R.forwardRef((r,t)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,onDismiss:h,...p}=r,m=R.useContext(Ym),[y,v]=R.useState(null),k=(y==null?void 0:y.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,O]=R.useState({}),F=Gr(t,G=>v(G)),S=Array.from(m.layers),[x]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),_=S.indexOf(x),D=y?S.indexOf(y):-1,N=m.layersWithOutsidePointerEventsDisabled.size>0,L=D>=_,q=Dw(G=>{const B=G.target,ie=[...m.branches].some(ue=>ue.contains(B));!L||ie||(l==null||l(G),d==null||d(G),G.defaultPrevented||h==null||h())},k),$=jw(G=>{const B=G.target;[...m.branches].some(ue=>ue.contains(B))||(u==null||u(G),d==null||d(G),G.defaultPrevented||h==null||h())},k);return Pw(G=>{D===m.layers.size-1&&(o==null||o(G),!G.defaultPrevented&&h&&(G.preventDefault(),h()))},k),R.useEffect(()=>{if(y)return s&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(wp=k.body.style.pointerEvents,k.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(y)),m.layers.add(y),xp(),()=>{s&&m.layersWithOutsidePointerEventsDisabled.size===1&&(k.body.style.pointerEvents=wp)}},[y,k,s,m]),R.useEffect(()=>()=>{y&&(m.layers.delete(y),m.layersWithOutsidePointerEventsDisabled.delete(y),xp())},[y,m]),R.useEffect(()=>{const G=()=>O({});return document.addEventListener(lc,G),()=>document.removeEventListener(lc,G)},[]),w.jsx(_n.div,{...p,ref:F,style:{pointerEvents:N?L?"auto":"none":void 0,...r.style},onFocusCapture:It(r.onFocusCapture,$.onFocusCapture),onBlurCapture:It(r.onBlurCapture,$.onBlurCapture),onPointerDownCapture:It(r.onPointerDownCapture,q.onPointerDownCapture)})});Xm.displayName=Aw;var Lw="DismissableLayerBranch",Jm=R.forwardRef((r,t)=>{const s=R.useContext(Ym),o=R.useRef(null),l=Gr(t,o);return R.useEffect(()=>{const u=o.current;if(u)return s.branches.add(u),()=>{s.branches.delete(u)}},[s.branches]),w.jsx(_n.div,{...r,ref:l})});Jm.displayName=Lw;function Dw(r,t=globalThis==null?void 0:globalThis.document){const s=Yr(r),o=R.useRef(!1),l=R.useRef(()=>{});return R.useEffect(()=>{const u=h=>{if(h.target&&!o.current){let p=function(){Zm(Nw,s,m,{discrete:!0})};const m={originalEvent:h};h.pointerType==="touch"?(t.removeEventListener("click",l.current),l.current=p,t.addEventListener("click",l.current,{once:!0})):p()}else t.removeEventListener("click",l.current);o.current=!1},d=window.setTimeout(()=>{t.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),t.removeEventListener("pointerdown",u),t.removeEventListener("click",l.current)}},[t,s]),{onPointerDownCapture:()=>o.current=!0}}function jw(r,t=globalThis==null?void 0:globalThis.document){const s=Yr(r),o=R.useRef(!1);return R.useEffect(()=>{const l=u=>{u.target&&!o.current&&Zm(Ow,s,{originalEvent:u},{discrete:!1})};return t.addEventListener("focusin",l),()=>t.removeEventListener("focusin",l)},[t,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function xp(){const r=new CustomEvent(lc);document.dispatchEvent(r)}function Zm(r,t,s,{discrete:o}){const l=s.originalEvent.target,u=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:s});t&&l.addEventListener(r,t,{once:!0}),o?Gm(l,u):l.dispatchEvent(u)}var Iw=Xm,Mw=Jm,Ho=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},Fw="Portal",eg=R.forwardRef((r,t)=>{var h;const{container:s,...o}=r,[l,u]=R.useState(!1);Ho(()=>u(!0),[]);const d=s||l&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return d?pw.createPortal(w.jsx(_n.div,{...o,ref:t}),d):null});eg.displayName=Fw;function Uw(r,t){return R.useReducer((s,o)=>t[s][o]??s,r)}var tg=r=>{const{present:t,children:s}=r,o=zw(t),l=typeof s=="function"?s({present:o.isPresent}):R.Children.only(s),u=Gr(o.ref,Bw(l));return typeof s=="function"||o.isPresent?R.cloneElement(l,{ref:u}):null};tg.displayName="Presence";function zw(r){const[t,s]=R.useState(),o=R.useRef(null),l=R.useRef(r),u=R.useRef("none"),d=r?"mounted":"unmounted",[h,p]=Uw(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const m=ya(o.current);u.current=h==="mounted"?m:"none"},[h]),Ho(()=>{const m=o.current,y=l.current;if(y!==r){const k=u.current,O=ya(m);r?p("MOUNT"):O==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(y&&k!==O?"ANIMATION_OUT":"UNMOUNT"),l.current=r}},[r,p]),Ho(()=>{if(t){let m;const y=t.ownerDocument.defaultView??window,v=O=>{const S=ya(o.current).includes(CSS.escape(O.animationName));if(O.target===t&&S&&(p("ANIMATION_END"),!l.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",m=y.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},k=O=>{O.target===t&&(u.current=ya(o.current))};return t.addEventListener("animationstart",k),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{y.clearTimeout(m),t.removeEventListener("animationstart",k),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:R.useCallback(m=>{o.current=m?getComputedStyle(m):null,s(m)},[])}}function ya(r){return(r==null?void 0:r.animationName)||"none"}function Bw(r){var o,l;let t=(o=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?r.ref:(t=(l=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:l.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?r.props.ref:r.props.ref||r.ref)}var $w=Wm[" useInsertionEffect ".trim().toString()]||Ho;function Vw({prop:r,defaultProp:t,onChange:s=()=>{},caller:o}){const[l,u,d]=qw({defaultProp:t,onChange:s}),h=r!==void 0,p=h?r:l;{const y=R.useRef(r!==void 0);R.useEffect(()=>{const v=y.current;v!==h&&console.warn(`${o} is changing from ${v?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=h},[h,o])}const m=R.useCallback(y=>{var v;if(h){const k=Hw(y)?y(r):y;k!==r&&((v=d.current)==null||v.call(d,k))}else u(y)},[h,r,u,d]);return[p,m]}function qw({defaultProp:r,onChange:t}){const[s,o]=R.useState(r),l=R.useRef(s),u=R.useRef(t);return $w(()=>{u.current=t},[t]),R.useEffect(()=>{var d;l.current!==s&&((d=u.current)==null||d.call(u,s),l.current=s)},[s,l]),[s,o,u]}function Hw(r){return typeof r=="function"}var Ww=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Qw="VisuallyHidden",qc=R.forwardRef((r,t)=>w.jsx(_n.span,{...r,ref:t,style:{...Ww,...r.style}}));qc.displayName=Qw;var Hc="ToastProvider",[Wc,Kw,Gw]=Ew("Toast"),[ng]=Km("Toast",[Gw]),[Yw,$a]=ng(Hc),rg=r=>{const{__scopeToast:t,label:s="Notification",duration:o=5e3,swipeDirection:l="right",swipeThreshold:u=50,children:d}=r,[h,p]=R.useState(null),[m,y]=R.useState(0),v=R.useRef(!1),k=R.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${Hc}\`. Expected non-empty \`string\`.`),w.jsx(Wc.Provider,{scope:t,children:w.jsx(Yw,{scope:t,label:s,duration:o,swipeDirection:l,swipeThreshold:u,toastCount:m,viewport:h,onViewportChange:p,onToastAdd:R.useCallback(()=>y(O=>O+1),[]),onToastRemove:R.useCallback(()=>y(O=>O-1),[]),isFocusedToastEscapeKeyDownRef:v,isClosePausedRef:k,children:d})})};rg.displayName=Hc;var sg="ToastViewport",Xw=["F8"],uc="toast.viewportPause",cc="toast.viewportResume",og=R.forwardRef((r,t)=>{const{__scopeToast:s,hotkey:o=Xw,label:l="Notifications ({hotkey})",...u}=r,d=$a(sg,s),h=Kw(s),p=R.useRef(null),m=R.useRef(null),y=R.useRef(null),v=R.useRef(null),k=Gr(t,v,d.onViewportChange),O=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=d.toastCount>0;R.useEffect(()=>{const x=_=>{var N;o.length!==0&&o.every(L=>_[L]||_.code===L)&&((N=v.current)==null||N.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[o]),R.useEffect(()=>{const x=p.current,_=v.current;if(F&&x&&_){const D=()=>{if(!d.isClosePausedRef.current){const $=new CustomEvent(uc);_.dispatchEvent($),d.isClosePausedRef.current=!0}},N=()=>{if(d.isClosePausedRef.current){const $=new CustomEvent(cc);_.dispatchEvent($),d.isClosePausedRef.current=!1}},L=$=>{!x.contains($.relatedTarget)&&N()},q=()=>{x.contains(document.activeElement)||N()};return x.addEventListener("focusin",D),x.addEventListener("focusout",L),x.addEventListener("pointermove",D),x.addEventListener("pointerleave",q),window.addEventListener("blur",D),window.addEventListener("focus",N),()=>{x.removeEventListener("focusin",D),x.removeEventListener("focusout",L),x.removeEventListener("pointermove",D),x.removeEventListener("pointerleave",q),window.removeEventListener("blur",D),window.removeEventListener("focus",N)}}},[F,d.isClosePausedRef]);const S=R.useCallback(({tabbingDirection:x})=>{const D=h().map(N=>{const L=N.ref.current,q=[L,...cx(L)];return x==="forwards"?q:q.reverse()});return(x==="forwards"?D.reverse():D).flat()},[h]);return R.useEffect(()=>{const x=v.current;if(x){const _=D=>{var q,$,G;const N=D.altKey||D.ctrlKey||D.metaKey;if(D.key==="Tab"&&!N){const B=document.activeElement,ie=D.shiftKey;if(D.target===x&&ie){(q=m.current)==null||q.focus();return}const Te=S({tabbingDirection:ie?"backwards":"forwards"}),xe=Te.findIndex(J=>J===B);Qu(Te.slice(xe+1))?D.preventDefault():ie?($=m.current)==null||$.focus():(G=y.current)==null||G.focus()}};return x.addEventListener("keydown",_),()=>x.removeEventListener("keydown",_)}},[h,S]),w.jsxs(Mw,{ref:p,role:"region","aria-label":l.replace("{hotkey}",O),tabIndex:-1,style:{pointerEvents:F?void 0:"none"},children:[F&&w.jsx(dc,{ref:m,onFocusFromOutsideViewport:()=>{const x=S({tabbingDirection:"forwards"});Qu(x)}}),w.jsx(Wc.Slot,{scope:s,children:w.jsx(_n.ol,{tabIndex:-1,...u,ref:k})}),F&&w.jsx(dc,{ref:y,onFocusFromOutsideViewport:()=>{const x=S({tabbingDirection:"backwards"});Qu(x)}})]})});og.displayName=sg;var ig="ToastFocusProxy",dc=R.forwardRef((r,t)=>{const{__scopeToast:s,onFocusFromOutsideViewport:o,...l}=r,u=$a(ig,s);return w.jsx(qc,{tabIndex:0,...l,ref:t,style:{position:"fixed"},onFocus:d=>{var m;const h=d.relatedTarget;!((m=u.viewport)!=null&&m.contains(h))&&o()}})});dc.displayName=ig;var ei="Toast",Jw="toast.swipeStart",Zw="toast.swipeMove",ex="toast.swipeCancel",tx="toast.swipeEnd",ag=R.forwardRef((r,t)=>{const{forceMount:s,open:o,defaultOpen:l,onOpenChange:u,...d}=r,[h,p]=Vw({prop:o,defaultProp:l??!0,onChange:u,caller:ei});return w.jsx(tg,{present:s||h,children:w.jsx(sx,{open:h,...d,ref:t,onClose:()=>p(!1),onPause:Yr(r.onPause),onResume:Yr(r.onResume),onSwipeStart:It(r.onSwipeStart,m=>{m.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:It(r.onSwipeMove,m=>{const{x:y,y:v}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","move"),m.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${y}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${v}px`)}),onSwipeCancel:It(r.onSwipeCancel,m=>{m.currentTarget.setAttribute("data-swipe","cancel"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:It(r.onSwipeEnd,m=>{const{x:y,y:v}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","end"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${y}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${v}px`),p(!1)})})})});ag.displayName=ei;var[nx,rx]=ng(ei,{onClose(){}}),sx=R.forwardRef((r,t)=>{const{__scopeToast:s,type:o="foreground",duration:l,open:u,onClose:d,onEscapeKeyDown:h,onPause:p,onResume:m,onSwipeStart:y,onSwipeMove:v,onSwipeCancel:k,onSwipeEnd:O,...F}=r,S=$a(ei,s),[x,_]=R.useState(null),D=Gr(t,J=>_(J)),N=R.useRef(null),L=R.useRef(null),q=l||S.duration,$=R.useRef(0),G=R.useRef(q),B=R.useRef(0),{onToastAdd:ie,onToastRemove:ue}=S,Ee=Yr(()=>{var Se;(x==null?void 0:x.contains(document.activeElement))&&((Se=S.viewport)==null||Se.focus()),d()}),Te=R.useCallback(J=>{!J||J===1/0||(window.clearTimeout(B.current),$.current=new Date().getTime(),B.current=window.setTimeout(Ee,J))},[Ee]);R.useEffect(()=>{const J=S.viewport;if(J){const Se=()=>{Te(G.current),m==null||m()},_e=()=>{const be=new Date().getTime()-$.current;G.current=G.current-be,window.clearTimeout(B.current),p==null||p()};return J.addEventListener(uc,_e),J.addEventListener(cc,Se),()=>{J.removeEventListener(uc,_e),J.removeEventListener(cc,Se)}}},[S.viewport,q,p,m,Te]),R.useEffect(()=>{u&&!S.isClosePausedRef.current&&Te(q)},[u,q,S.isClosePausedRef,Te]),R.useEffect(()=>(ie(),()=>ue()),[ie,ue]);const xe=R.useMemo(()=>x?pg(x):null,[x]);return S.viewport?w.jsxs(w.Fragment,{children:[xe&&w.jsx(ox,{__scopeToast:s,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:xe}),w.jsx(nx,{scope:s,onClose:Ee,children:$c.createPortal(w.jsx(Wc.ItemSlot,{scope:s,children:w.jsx(Iw,{asChild:!0,onEscapeKeyDown:It(h,()=>{S.isFocusedToastEscapeKeyDownRef.current||Ee(),S.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(_n.li,{tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":S.swipeDirection,...F,ref:D,style:{userSelect:"none",touchAction:"none",...r.style},onKeyDown:It(r.onKeyDown,J=>{J.key==="Escape"&&(h==null||h(J.nativeEvent),J.nativeEvent.defaultPrevented||(S.isFocusedToastEscapeKeyDownRef.current=!0,Ee()))}),onPointerDown:It(r.onPointerDown,J=>{J.button===0&&(N.current={x:J.clientX,y:J.clientY})}),onPointerMove:It(r.onPointerMove,J=>{if(!N.current)return;const Se=J.clientX-N.current.x,_e=J.clientY-N.current.y,be=!!L.current,K=["left","right"].includes(S.swipeDirection),ae=["left","up"].includes(S.swipeDirection)?Math.min:Math.max,U=K?ae(0,Se):0,P=K?0:ae(0,_e),z=J.pointerType==="touch"?10:2,ce={x:U,y:P},me={originalEvent:J,delta:ce};be?(L.current=ce,va(Zw,v,me,{discrete:!1})):Ep(ce,S.swipeDirection,z)?(L.current=ce,va(Jw,y,me,{discrete:!1}),J.target.setPointerCapture(J.pointerId)):(Math.abs(Se)>z||Math.abs(_e)>z)&&(N.current=null)}),onPointerUp:It(r.onPointerUp,J=>{const Se=L.current,_e=J.target;if(_e.hasPointerCapture(J.pointerId)&&_e.releasePointerCapture(J.pointerId),L.current=null,N.current=null,Se){const be=J.currentTarget,K={originalEvent:J,delta:Se};Ep(Se,S.swipeDirection,S.swipeThreshold)?va(tx,O,K,{discrete:!0}):va(ex,k,K,{discrete:!0}),be.addEventListener("click",ae=>ae.preventDefault(),{once:!0})}})})})}),S.viewport)})]}):null}),ox=r=>{const{__scopeToast:t,children:s,...o}=r,l=$a(ei,t),[u,d]=R.useState(!1),[h,p]=R.useState(!1);return lx(()=>d(!0)),R.useEffect(()=>{const m=window.setTimeout(()=>p(!0),1e3);return()=>window.clearTimeout(m)},[]),h?null:w.jsx(eg,{asChild:!0,children:w.jsx(qc,{...o,children:u&&w.jsxs(w.Fragment,{children:[l.label," ",s]})})})},ix="ToastTitle",lg=R.forwardRef((r,t)=>{const{__scopeToast:s,...o}=r;return w.jsx(_n.div,{...o,ref:t})});lg.displayName=ix;var ax="ToastDescription",ug=R.forwardRef((r,t)=>{const{__scopeToast:s,...o}=r;return w.jsx(_n.div,{...o,ref:t})});ug.displayName=ax;var cg="ToastAction",dg=R.forwardRef((r,t)=>{const{altText:s,...o}=r;return s.trim()?w.jsx(hg,{altText:s,asChild:!0,children:w.jsx(Qc,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${cg}\`. Expected non-empty \`string\`.`),null)});dg.displayName=cg;var fg="ToastClose",Qc=R.forwardRef((r,t)=>{const{__scopeToast:s,...o}=r,l=rx(fg,s);return w.jsx(hg,{asChild:!0,children:w.jsx(_n.button,{type:"button",...o,ref:t,onClick:It(r.onClick,l.onClose)})})});Qc.displayName=fg;var hg=R.forwardRef((r,t)=>{const{__scopeToast:s,altText:o,...l}=r;return w.jsx(_n.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...l,ref:t})});function pg(r){const t=[];return Array.from(r.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),ux(o)){const l=o.ariaHidden||o.hidden||o.style.display==="none",u=o.dataset.radixToastAnnounceExclude==="";if(!l)if(u){const d=o.dataset.radixToastAnnounceAlt;d&&t.push(d)}else t.push(...pg(o))}}),t}function va(r,t,s,{discrete:o}){const l=s.originalEvent.currentTarget,u=new CustomEvent(r,{bubbles:!0,cancelable:!0,detail:s});t&&l.addEventListener(r,t,{once:!0}),o?Gm(l,u):l.dispatchEvent(u)}var Ep=(r,t,s=0)=>{const o=Math.abs(r.x),l=Math.abs(r.y),u=o>l;return t==="left"||t==="right"?u&&o>s:!u&&l>s};function lx(r=()=>{}){const t=Yr(r);Ho(()=>{let s=0,o=0;return s=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(o)}},[t])}function ux(r){return r.nodeType===r.ELEMENT_NODE}function cx(r){const t=[],s=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const l=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||l?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)t.push(s.currentNode);return t}function Qu(r){const t=document.activeElement;return r.some(s=>s===t?!0:(s.focus(),document.activeElement!==t))}var dx=rg,mg=og,gg=ag,yg=lg,vg=ug,wg=dg,xg=Qc;function Eg(r){var t,s,o="";if(typeof r=="string"||typeof r=="number")o+=r;else if(typeof r=="object")if(Array.isArray(r)){var l=r.length;for(t=0;ttypeof r=="boolean"?`${r}`:r===0?"0":r,Sp=_g,fx=(r,t)=>s=>{var o;if((t==null?void 0:t.variants)==null)return Sp(r,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:l,defaultVariants:u}=t,d=Object.keys(l).map(m=>{const y=s==null?void 0:s[m],v=u==null?void 0:u[m];if(y===null)return null;const k=_p(y)||_p(v);return l[m][k]}),h=s&&Object.entries(s).reduce((m,y)=>{let[v,k]=y;return k===void 0||(m[v]=k),m},{}),p=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((m,y)=>{let{class:v,className:k,...O}=y;return Object.entries(O).every(F=>{let[S,x]=F;return Array.isArray(x)?x.includes({...u,...h}[S]):{...u,...h}[S]===x})?[...m,v,k]:m},[]);return Sp(r,d,p,s==null?void 0:s.class,s==null?void 0:s.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const hx=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Sg=(...r)=>r.filter((t,s,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===s).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var px={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mx=R.forwardRef(({color:r="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:l="",children:u,iconNode:d,...h},p)=>R.createElement("svg",{ref:p,...px,width:t,height:t,stroke:r,strokeWidth:o?Number(s)*24/Number(t):s,className:Sg("lucide",l),...h},[...d.map(([m,y])=>R.createElement(m,y)),...Array.isArray(u)?u:[u]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Gt=(r,t)=>{const s=R.forwardRef(({className:o,...l},u)=>R.createElement(mx,{ref:u,iconNode:t,className:Sg(`lucide-${hx(r)}`,o),...l}));return s.displayName=`${r}`,s};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const gx=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],yx=Gt("ArrowRight",gx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vx=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],wx=Gt("Check",vx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ex=Gt("ChevronRight",xx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _x=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],Sx=Gt("Facebook",_x);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bx=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],kx=Gt("House",bx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Cx=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Rx=Gt("Link2",Cx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Tx=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]],Px=Gt("Linkedin",Tx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ax=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],Nx=Gt("Mail",Ax);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ox=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],Lx=Gt("Menu",Ox);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dx=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],jx=Gt("Printer",Dx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ix=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],Mx=Gt("Twitter",Ix);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fx=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],bg=Gt("X",Fx),Ux=(r,t)=>{const s=new Array(r.length+t.length);for(let o=0;o({classGroupId:r,validator:t}),kg=(r=new Map,t=null,s)=>({nextPart:r,validators:t,classGroupId:s}),ja="-",bp=[],Bx="arbitrary..",$x=r=>{const t=qx(r),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=r;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return Vx(d);const h=d.split(ja),p=h[0]===""&&h.length>1?1:0;return Cg(h,p,t)},getConflictingClassGroupIds:(d,h)=>{if(h){const p=o[d],m=s[d];return p?m?Ux(m,p):p:m||bp}return s[d]||bp}}},Cg=(r,t,s)=>{if(r.length-t===0)return s.classGroupId;const l=r[t],u=s.nextPart.get(l);if(u){const m=Cg(r,t+1,u);if(m)return m}const d=s.validators;if(d===null)return;const h=t===0?r.join(ja):r.slice(t).join(ja),p=d.length;for(let m=0;mr.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=r.slice(1,-1),s=t.indexOf(":"),o=t.slice(0,s);return o?Bx+o:void 0})(),qx=r=>{const{theme:t,classGroups:s}=r;return Hx(s,t)},Hx=(r,t)=>{const s=kg();for(const o in r){const l=r[o];Kc(l,s,o,t)}return s},Kc=(r,t,s,o)=>{const l=r.length;for(let u=0;u{if(typeof r=="string"){Qx(r,t,s);return}if(typeof r=="function"){Kx(r,t,s,o);return}Gx(r,t,s,o)},Qx=(r,t,s)=>{const o=r===""?t:Rg(t,r);o.classGroupId=s},Kx=(r,t,s,o)=>{if(Yx(r)){Kc(r(o),t,s,o);return}t.validators===null&&(t.validators=[]),t.validators.push(zx(s,r))},Gx=(r,t,s,o)=>{const l=Object.entries(r),u=l.length;for(let d=0;d{let s=r;const o=t.split(ja),l=o.length;for(let u=0;u"isThemeGetter"in r&&r.isThemeGetter===!0,Xx=r=>{if(r<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),o=Object.create(null);const l=(u,d)=>{s[u]=d,t++,t>r&&(t=0,o=s,s=Object.create(null))};return{get(u){let d=s[u];if(d!==void 0)return d;if((d=o[u])!==void 0)return l(u,d),d},set(u,d){u in s?s[u]=d:l(u,d)}}},fc="!",kp=":",Jx=[],Cp=(r,t,s,o,l)=>({modifiers:r,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:o,isExternal:l}),Zx=r=>{const{prefix:t,experimentalParseClassName:s}=r;let o=l=>{const u=[];let d=0,h=0,p=0,m;const y=l.length;for(let S=0;Sp?m-p:void 0;return Cp(u,O,k,F)};if(t){const l=t+kp,u=o;o=d=>d.startsWith(l)?u(d.slice(l.length)):Cp(Jx,!1,d,void 0,!0)}if(s){const l=o;o=u=>s({className:u,parseClassName:l})}return o},e1=r=>{const t=new Map;return r.orderSensitiveModifiers.forEach((s,o)=>{t.set(s,1e6+o)}),s=>{const o=[];let l=[];for(let u=0;u0&&(l.sort(),o.push(...l),l=[]),o.push(d)):l.push(d)}return l.length>0&&(l.sort(),o.push(...l)),o}},t1=r=>({cache:Xx(r.cacheSize),parseClassName:Zx(r),sortModifiers:e1(r),...$x(r)}),n1=/\s+/,r1=(r,t)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:l,sortModifiers:u}=t,d=[],h=r.trim().split(n1);let p="";for(let m=h.length-1;m>=0;m-=1){const y=h[m],{isExternal:v,modifiers:k,hasImportantModifier:O,baseClassName:F,maybePostfixModifierPosition:S}=s(y);if(v){p=y+(p.length>0?" "+p:p);continue}let x=!!S,_=o(x?F.substring(0,S):F);if(!_){if(!x){p=y+(p.length>0?" "+p:p);continue}if(_=o(F),!_){p=y+(p.length>0?" "+p:p);continue}x=!1}const D=k.length===0?"":k.length===1?k[0]:u(k).join(":"),N=O?D+fc:D,L=N+_;if(d.indexOf(L)>-1)continue;d.push(L);const q=l(_,x);for(let $=0;$0?" "+p:p)}return p},s1=(...r)=>{let t=0,s,o,l="";for(;t{if(typeof r=="string")return r;let t,s="";for(let o=0;o{let s,o,l,u;const d=p=>{const m=t.reduce((y,v)=>v(y),r());return s=t1(m),o=s.cache.get,l=s.cache.set,u=h,h(p)},h=p=>{const m=o(p);if(m)return m;const y=r1(p,s);return l(p,y),y};return u=d,(...p)=>u(s1(...p))},i1=[],Ze=r=>{const t=s=>s[r]||i1;return t.isThemeGetter=!0,t},Pg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ag=/^\((?:(\w[\w-]*):)?(.+)\)$/i,a1=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,l1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,u1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,c1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,d1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,f1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sr=r=>a1.test(r),ke=r=>!!r&&!Number.isNaN(Number(r)),or=r=>!!r&&Number.isInteger(Number(r)),Ku=r=>r.endsWith("%")&&ke(r.slice(0,-1)),On=r=>l1.test(r),Ng=()=>!0,h1=r=>u1.test(r)&&!c1.test(r),Gc=()=>!1,p1=r=>d1.test(r),m1=r=>f1.test(r),g1=r=>!re(r)&&!se(r),y1=r=>wr(r,Dg,Gc),re=r=>Pg.test(r),Lr=r=>wr(r,jg,h1),Rp=r=>wr(r,k1,ke),v1=r=>wr(r,Mg,Ng),w1=r=>wr(r,Ig,Gc),Tp=r=>wr(r,Og,Gc),x1=r=>wr(r,Lg,m1),wa=r=>wr(r,Fg,p1),se=r=>Ag.test(r),Lo=r=>es(r,jg),E1=r=>es(r,Ig),Pp=r=>es(r,Og),_1=r=>es(r,Dg),S1=r=>es(r,Lg),xa=r=>es(r,Fg,!0),b1=r=>es(r,Mg,!0),wr=(r,t,s)=>{const o=Pg.exec(r);return o?o[1]?t(o[1]):s(o[2]):!1},es=(r,t,s=!1)=>{const o=Ag.exec(r);return o?o[1]?t(o[1]):s:!1},Og=r=>r==="position"||r==="percentage",Lg=r=>r==="image"||r==="url",Dg=r=>r==="length"||r==="size"||r==="bg-size",jg=r=>r==="length",k1=r=>r==="number",Ig=r=>r==="family-name",Mg=r=>r==="number"||r==="weight",Fg=r=>r==="shadow",C1=()=>{const r=Ze("color"),t=Ze("font"),s=Ze("text"),o=Ze("font-weight"),l=Ze("tracking"),u=Ze("leading"),d=Ze("breakpoint"),h=Ze("container"),p=Ze("spacing"),m=Ze("radius"),y=Ze("shadow"),v=Ze("inset-shadow"),k=Ze("text-shadow"),O=Ze("drop-shadow"),F=Ze("blur"),S=Ze("perspective"),x=Ze("aspect"),_=Ze("ease"),D=Ze("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],q=()=>[...L(),se,re],$=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],B=()=>[se,re,p],ie=()=>[sr,"full","auto",...B()],ue=()=>[or,"none","subgrid",se,re],Ee=()=>["auto",{span:["full",or,se,re]},or,se,re],Te=()=>[or,"auto",se,re],xe=()=>["auto","min","max","fr",se,re],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Se=()=>["start","end","center","stretch","center-safe","end-safe"],_e=()=>["auto",...B()],be=()=>[sr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],K=()=>[sr,"screen","full","dvw","lvw","svw","min","max","fit",...B()],ae=()=>[sr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...B()],U=()=>[r,se,re],P=()=>[...L(),Pp,Tp,{position:[se,re]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ce=()=>["auto","cover","contain",_1,y1,{size:[se,re]}],me=()=>[Ku,Lo,Lr],he=()=>["","none","full",m,se,re],Y=()=>["",ke,Lo,Lr],ve=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[ke,Ku,Pp,Tp],et=()=>["","none",F,se,re],Mt=()=>["none",ke,se,re],ot=()=>["none",ke,se,re],Yt=()=>[ke,se,re],Ft=()=>[sr,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[On],breakpoint:[On],color:[Ng],container:[On],"drop-shadow":[On],ease:["in","out","in-out"],font:[g1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[On],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[On],shadow:[On],spacing:["px",ke],text:[On],"text-shadow":[On],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sr,re,se,x]}],container:["container"],columns:[{columns:[ke,re,se,h]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:q()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{"inset-s":ie(),start:ie()}],end:[{"inset-e":ie(),end:ie()}],"inset-bs":[{"inset-bs":ie()}],"inset-be":[{"inset-be":ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[or,"auto",se,re]}],basis:[{basis:[sr,"full","auto",h,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,sr,"auto","initial","none",re]}],grow:[{grow:["",ke,se,re]}],shrink:[{shrink:["",ke,se,re]}],order:[{order:[or,"first","last","none",se,re]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:Ee()}],"col-start":[{"col-start":Te()}],"col-end":[{"col-end":Te()}],"grid-rows":[{"grid-rows":ue()}],"row-start-end":[{row:Ee()}],"row-start":[{"row-start":Te()}],"row-end":[{"row-end":Te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":xe()}],"auto-rows":[{"auto-rows":xe()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...Se(),"normal"]}],"justify-self":[{"justify-self":["auto",...Se()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...Se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Se(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...Se(),"baseline"]}],"place-self":[{"place-self":["auto",...Se()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pbs:[{pbs:B()}],pbe:[{pbe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:_e()}],mx:[{mx:_e()}],my:[{my:_e()}],ms:[{ms:_e()}],me:[{me:_e()}],mbs:[{mbs:_e()}],mbe:[{mbe:_e()}],mt:[{mt:_e()}],mr:[{mr:_e()}],mb:[{mb:_e()}],ml:[{ml:_e()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:be()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[h,"screen",...be()]}],"min-w":[{"min-w":[h,"screen","none",...be()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},...be()]}],h:[{h:["screen","lh",...be()]}],"min-h":[{"min-h":["screen","lh","none",...be()]}],"max-h":[{"max-h":["screen","lh",...be()]}],"font-size":[{text:["base",s,Lo,Lr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,b1,v1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ku,re]}],"font-family":[{font:[E1,w1,t]}],"font-features":[{"font-features":[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,se,re]}],"line-clamp":[{"line-clamp":[ke,"none",se,Rp]}],leading:[{leading:[u,...B()]}],"list-image":[{"list-image":["none",se,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",se,Lr]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[ke,"auto",se,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},or,se,re],radial:["",se,re],conic:[or,se,re]},S1,x1]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:me()}],"gradient-via-pos":[{via:me()}],"gradient-to-pos":[{to:me()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-bs":[{"border-bs":Y()}],"border-w-be":[{"border-be":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,se,re]}],"outline-w":[{outline:["",ke,Lo,Lr]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",y,xa,wa]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",v,xa,wa]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[ke,Lr]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",k,xa,wa]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[ke,se,re]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[se,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,re]}],filter:[{filter:["","none",se,re]}],blur:[{blur:et()}],brightness:[{brightness:[ke,se,re]}],contrast:[{contrast:[ke,se,re]}],"drop-shadow":[{"drop-shadow":["","none",O,xa,wa]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",ke,se,re]}],"hue-rotate":[{"hue-rotate":[ke,se,re]}],invert:[{invert:["",ke,se,re]}],saturate:[{saturate:[ke,se,re]}],sepia:[{sepia:["",ke,se,re]}],"backdrop-filter":[{"backdrop-filter":["","none",se,re]}],"backdrop-blur":[{"backdrop-blur":et()}],"backdrop-brightness":[{"backdrop-brightness":[ke,se,re]}],"backdrop-contrast":[{"backdrop-contrast":[ke,se,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,se,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,se,re]}],"backdrop-invert":[{"backdrop-invert":["",ke,se,re]}],"backdrop-opacity":[{"backdrop-opacity":[ke,se,re]}],"backdrop-saturate":[{"backdrop-saturate":[ke,se,re]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,se,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",se,re]}],ease:[{ease:["linear","initial",_,se,re]}],delay:[{delay:[ke,se,re]}],animate:[{animate:["none",D,se,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,se,re]}],"perspective-origin":[{"perspective-origin":q()}],rotate:[{rotate:Mt()}],"rotate-x":[{"rotate-x":Mt()}],"rotate-y":[{"rotate-y":Mt()}],"rotate-z":[{"rotate-z":Mt()}],scale:[{scale:ot()}],"scale-x":[{"scale-x":ot()}],"scale-y":[{"scale-y":ot()}],"scale-z":[{"scale-z":ot()}],"scale-3d":["scale-3d"],skew:[{skew:Yt()}],"skew-x":[{"skew-x":Yt()}],"skew-y":[{"skew-y":Yt()}],transform:[{transform:[se,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ft()}],"translate-x":[{"translate-x":Ft()}],"translate-y":[{"translate-y":Ft()}],"translate-z":[{"translate-z":Ft()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mbs":[{"scroll-mbs":B()}],"scroll-mbe":[{"scroll-mbe":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pbs":[{"scroll-pbs":B()}],"scroll-pbe":[{"scroll-pbe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se,re]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[ke,Lo,Lr,Rp]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},R1=o1(C1);function Vs(...r){return R1(_g(r))}const T1=dx,Ug=R.forwardRef(({className:r,...t},s)=>w.jsx(mg,{ref:s,className:Vs("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",r),...t}));Ug.displayName=mg.displayName;const P1=fx("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),zg=R.forwardRef(({className:r,variant:t,...s},o)=>w.jsx(gg,{ref:o,className:Vs(P1({variant:t}),r),...s}));zg.displayName=gg.displayName;const A1=R.forwardRef(({className:r,...t},s)=>w.jsx(wg,{ref:s,className:Vs("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",r),...t}));A1.displayName=wg.displayName;const Bg=R.forwardRef(({className:r,...t},s)=>w.jsx(xg,{ref:s,className:Vs("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",r),"toast-close":"",...t,children:w.jsx(bg,{className:"h-4 w-4"})}));Bg.displayName=xg.displayName;const $g=R.forwardRef(({className:r,...t},s)=>w.jsx(yg,{ref:s,className:Vs("text-sm font-semibold",r),...t}));$g.displayName=yg.displayName;const Vg=R.forwardRef(({className:r,...t},s)=>w.jsx(vg,{ref:s,className:Vs("text-sm opacity-90",r),...t}));Vg.displayName=vg.displayName;function N1(){const{toasts:r}=hw();return w.jsxs(T1,{children:[r.map(function({id:t,title:s,description:o,action:l,...u}){return w.jsxs(zg,{...u,children:[w.jsxs("div",{className:"grid gap-1",children:[s&&w.jsx($g,{children:s}),o&&w.jsx(Vg,{children:o})]}),l,w.jsx(Bg,{})]},t)}),w.jsx(Ug,{})]})}var ti=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},O1={setTimeout:(r,t)=>setTimeout(r,t),clearTimeout:r=>clearTimeout(r),setInterval:(r,t)=>setInterval(r,t),clearInterval:r=>clearInterval(r)},lr,Uc,jm,L1=(jm=class{constructor(){pe(this,lr,O1);pe(this,Uc,!1)}setTimeoutProvider(r){ee(this,lr,r)}setTimeout(r,t){return C(this,lr).setTimeout(r,t)}clearTimeout(r){C(this,lr).clearTimeout(r)}setInterval(r,t){return C(this,lr).setInterval(r,t)}clearInterval(r){C(this,lr).clearInterval(r)}},lr=new WeakMap,Uc=new WeakMap,jm),Ir=new L1;function D1(r){setTimeout(r,0)}var Xr=typeof window>"u"||"Deno"in globalThis;function Pt(){}function j1(r,t){return typeof r=="function"?r(t):r}function hc(r){return typeof r=="number"&&r>=0&&r!==1/0}function qg(r,t){return Math.max(r+(t||0)-Date.now(),0)}function yr(r,t){return typeof r=="function"?r(t):r}function Qt(r,t){return typeof r=="function"?r(t):r}function Ap(r,t){const{type:s="all",exact:o,fetchStatus:l,predicate:u,queryKey:d,stale:h}=r;if(d){if(o){if(t.queryHash!==Yc(d,t.options))return!1}else if(!Qo(t.queryKey,d))return!1}if(s!=="all"){const p=t.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof h=="boolean"&&t.isStale()!==h||l&&l!==t.state.fetchStatus||u&&!u(t))}function Np(r,t){const{exact:s,status:o,predicate:l,mutationKey:u}=r;if(u){if(!t.options.mutationKey)return!1;if(s){if(Wo(t.options.mutationKey)!==Wo(u))return!1}else if(!Qo(t.options.mutationKey,u))return!1}return!(o&&t.state.status!==o||l&&!l(t))}function Yc(r,t){return((t==null?void 0:t.queryKeyHashFn)||Wo)(r)}function Wo(r){return JSON.stringify(r,(t,s)=>mc(s)?Object.keys(s).sort().reduce((o,l)=>(o[l]=s[l],o),{}):s)}function Qo(r,t){return r===t?!0:typeof r!=typeof t?!1:r&&t&&typeof r=="object"&&typeof t=="object"?Object.keys(t).every(s=>Qo(r[s],t[s])):!1}var I1=Object.prototype.hasOwnProperty;function Hg(r,t,s=0){if(r===t)return r;if(s>500)return t;const o=Op(r)&&Op(t);if(!o&&!(mc(r)&&mc(t)))return t;const u=(o?r:Object.keys(r)).length,d=o?t:Object.keys(t),h=d.length,p=o?new Array(h):{};let m=0;for(let y=0;y{Ir.setTimeout(t,r)})}function gc(r,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(r,t):s.structuralSharing!==!1?Hg(r,t):t}function F1(r,t,s=0){const o=[...r,t];return s&&o.length>s?o.slice(1):o}function U1(r,t,s=0){const o=[t,...r];return s&&o.length>s?o.slice(0,-1):o}var Xc=Symbol();function Wg(r,t){return!r.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!r.queryFn||r.queryFn===Xc?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}function Qg(r,t){return typeof r=="function"?r(...t):!!r}function z1(r,t,s){let o=!1,l;return Object.defineProperty(r,"signal",{enumerable:!0,get:()=>(l??(l=t()),o||(o=!0,l.aborted?s():l.addEventListener("abort",s,{once:!0})),l)}),r}var Fr,ur,Ps,Im,B1=(Im=class extends ti{constructor(){super();pe(this,Fr);pe(this,ur);pe(this,Ps);ee(this,Ps,t=>{if(!Xr&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){C(this,ur)||this.setEventListener(C(this,Ps))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,ur))==null||t.call(this),ee(this,ur,void 0))}setEventListener(t){var s;ee(this,Ps,t),(s=C(this,ur))==null||s.call(this),ee(this,ur,t(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(t){C(this,Fr)!==t&&(ee(this,Fr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof C(this,Fr)=="boolean"?C(this,Fr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Fr=new WeakMap,ur=new WeakMap,Ps=new WeakMap,Im),Jc=new B1;function yc(){let r,t;const s=new Promise((l,u)=>{r=l,t=u});s.status="pending",s.catch(()=>{});function o(l){Object.assign(s,l),delete s.resolve,delete s.reject}return s.resolve=l=>{o({status:"fulfilled",value:l}),r(l)},s.reject=l=>{o({status:"rejected",reason:l}),t(l)},s}var $1=D1;function V1(){let r=[],t=0,s=h=>{h()},o=h=>{h()},l=$1;const u=h=>{t?r.push(h):l(()=>{s(h)})},d=()=>{const h=r;r=[],h.length&&l(()=>{o(()=>{h.forEach(p=>{s(p)})})})};return{batch:h=>{let p;t++;try{p=h()}finally{t--,t||d()}return p},batchCalls:h=>(...p)=>{u(()=>{h(...p)})},schedule:u,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{o=h},setScheduler:h=>{l=h}}}var ct=V1(),As,cr,Ns,Mm,q1=(Mm=class extends ti{constructor(){super();pe(this,As,!0);pe(this,cr);pe(this,Ns);ee(this,Ns,t=>{if(!Xr&&window.addEventListener){const s=()=>t(!0),o=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",o)}}})}onSubscribe(){C(this,cr)||this.setEventListener(C(this,Ns))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,cr))==null||t.call(this),ee(this,cr,void 0))}setEventListener(t){var s;ee(this,Ns,t),(s=C(this,cr))==null||s.call(this),ee(this,cr,t(this.setOnline.bind(this)))}setOnline(t){C(this,As)!==t&&(ee(this,As,t),this.listeners.forEach(o=>{o(t)}))}isOnline(){return C(this,As)}},As=new WeakMap,cr=new WeakMap,Ns=new WeakMap,Mm),Ia=new q1;function H1(r){return Math.min(1e3*2**r,3e4)}function Kg(r){return(r??"online")==="online"?Ia.isOnline():!0}var vc=class extends Error{constructor(r){super("CancelledError"),this.revert=r==null?void 0:r.revert,this.silent=r==null?void 0:r.silent}};function Gg(r){let t=!1,s=0,o;const l=yc(),u=()=>l.status!=="pending",d=S=>{var x;if(!u()){const _=new vc(S);k(_),(x=r.onCancel)==null||x.call(r,_)}},h=()=>{t=!0},p=()=>{t=!1},m=()=>Jc.isFocused()&&(r.networkMode==="always"||Ia.isOnline())&&r.canRun(),y=()=>Kg(r.networkMode)&&r.canRun(),v=S=>{u()||(o==null||o(),l.resolve(S))},k=S=>{u()||(o==null||o(),l.reject(S))},O=()=>new Promise(S=>{var x;o=_=>{(u()||m())&&S(_)},(x=r.onPause)==null||x.call(r)}).then(()=>{var S;o=void 0,u()||(S=r.onContinue)==null||S.call(r)}),F=()=>{if(u())return;let S;const x=s===0?r.initialPromise:void 0;try{S=x??r.fn()}catch(_){S=Promise.reject(_)}Promise.resolve(S).then(v).catch(_=>{var $;if(u())return;const D=r.retry??(Xr?0:3),N=r.retryDelay??H1,L=typeof N=="function"?N(s,_):N,q=D===!0||typeof D=="number"&&sm()?void 0:O()).then(()=>{t?k(_):F()})})};return{promise:l,status:()=>l.status,cancel:d,continue:()=>(o==null||o(),l),cancelRetry:h,continueRetry:p,canStart:y,start:()=>(y()?F():O().then(F),l)}}var Ur,Fm,Yg=(Fm=class{constructor(){pe(this,Ur)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hc(this.gcTime)&&ee(this,Ur,Ir.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(Xr?1/0:300*1e3))}clearGcTimeout(){C(this,Ur)&&(Ir.clearTimeout(C(this,Ur)),ee(this,Ur,void 0))}},Ur=new WeakMap,Fm),zr,Os,Wt,Br,st,Go,$r,an,Ln,Um,W1=(Um=class extends Yg{constructor(t){super();pe(this,an);pe(this,zr);pe(this,Os);pe(this,Wt);pe(this,Br);pe(this,st);pe(this,Go);pe(this,$r);ee(this,$r,!1),ee(this,Go,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,Br,t.client),ee(this,Wt,C(this,Br).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,zr,jp(this.options)),this.state=t.state??C(this,zr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,st))==null?void 0:t.promise}setOptions(t){if(this.options={...C(this,Go),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=jp(this.options);s.data!==void 0&&(this.setState(Dp(s.data,s.dataUpdatedAt)),ee(this,zr,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,Wt).remove(this)}setData(t,s){const o=gc(this.state.data,t,this.options);return Pe(this,an,Ln).call(this,{data:o,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),o}setState(t,s){Pe(this,an,Ln).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var o,l;const s=(o=C(this,st))==null?void 0:o.promise;return(l=C(this,st))==null||l.cancel(t),s?s.then(Pt).catch(Pt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,zr))}isActive(){return this.observers.some(t=>Qt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Xc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>yr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!qg(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(o=>o.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=C(this,st))==null||s.continue()}onOnline(){var s;const t=this.observers.find(o=>o.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=C(this,st))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,Wt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(C(this,st)&&(C(this,$r)?C(this,st).cancel({revert:!0}):C(this,st).cancelRetry()),this.scheduleGc()),C(this,Wt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Pe(this,an,Ln).call(this,{type:"invalidate"})}async fetch(t,s){var p,m,y,v,k,O,F,S,x,_,D,N;if(this.state.fetchStatus!=="idle"&&((p=C(this,st))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(C(this,st))return C(this,st).continueRetry(),C(this,st).promise}if(t&&this.setOptions(t),!this.options.queryFn){const L=this.observers.find(q=>q.options.queryFn);L&&this.setOptions(L.options)}const o=new AbortController,l=L=>{Object.defineProperty(L,"signal",{enumerable:!0,get:()=>(ee(this,$r,!0),o.signal)})},u=()=>{const L=Wg(this.options,s),$=(()=>{const G={client:C(this,Br),queryKey:this.queryKey,meta:this.meta};return l(G),G})();return ee(this,$r,!1),this.options.persister?this.options.persister(L,$,this):L($)},h=(()=>{const L={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:C(this,Br),state:this.state,fetchFn:u};return l(L),L})();(m=this.options.behavior)==null||m.onFetch(h,this),ee(this,Os,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=h.fetchOptions)==null?void 0:y.meta))&&Pe(this,an,Ln).call(this,{type:"fetch",meta:(v=h.fetchOptions)==null?void 0:v.meta}),ee(this,st,Gg({initialPromise:s==null?void 0:s.initialPromise,fn:h.fetchFn,onCancel:L=>{L instanceof vc&&L.revert&&this.setState({...C(this,Os),fetchStatus:"idle"}),o.abort()},onFail:(L,q)=>{Pe(this,an,Ln).call(this,{type:"failed",failureCount:L,error:q})},onPause:()=>{Pe(this,an,Ln).call(this,{type:"pause"})},onContinue:()=>{Pe(this,an,Ln).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const L=await C(this,st).start();if(L===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(L),(O=(k=C(this,Wt).config).onSuccess)==null||O.call(k,L,this),(S=(F=C(this,Wt).config).onSettled)==null||S.call(F,L,this.state.error,this),L}catch(L){if(L instanceof vc){if(L.silent)return C(this,st).promise;if(L.revert){if(this.state.data===void 0)throw L;return this.state.data}}throw Pe(this,an,Ln).call(this,{type:"error",error:L}),(_=(x=C(this,Wt).config).onError)==null||_.call(x,L,this),(N=(D=C(this,Wt).config).onSettled)==null||N.call(D,this.state.data,L,this),L}finally{this.scheduleGc()}}},zr=new WeakMap,Os=new WeakMap,Wt=new WeakMap,Br=new WeakMap,st=new WeakMap,Go=new WeakMap,$r=new WeakMap,an=new WeakSet,Ln=function(t){const s=o=>{switch(t.type){case"failed":return{...o,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...Xg(o.data,this.options),fetchMeta:t.meta??null};case"success":const l={...o,...Dp(t.data,t.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,Os,t.manual?l:void 0),l;case"error":const u=t.error;return{...o,error:u,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...t.state}}};this.state=s(this.state),ct.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),C(this,Wt).notify({query:this,type:"updated",action:t})})},Um);function Xg(r,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Kg(t.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function Dp(r,t){return{data:r,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function jp(r){const t=typeof r.initialData=="function"?r.initialData():r.initialData,s=t!==void 0,o=s?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Tt,Ae,Yo,Et,Vr,Ls,Dn,dr,Xo,Ds,js,qr,Hr,fr,Is,je,Mo,wc,xc,Ec,_c,Sc,bc,kc,Jg,zm,Q1=(zm=class extends ti{constructor(t,s){super();pe(this,je);pe(this,Tt);pe(this,Ae);pe(this,Yo);pe(this,Et);pe(this,Vr);pe(this,Ls);pe(this,Dn);pe(this,dr);pe(this,Xo);pe(this,Ds);pe(this,js);pe(this,qr);pe(this,Hr);pe(this,fr);pe(this,Is,new Set);this.options=s,ee(this,Tt,t),ee(this,dr,null),ee(this,Dn,yc()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,Ae).addObserver(this),Ip(C(this,Ae),this.options)?Pe(this,je,Mo).call(this):this.updateResult(),Pe(this,je,_c).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Cc(C(this,Ae),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Cc(C(this,Ae),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Pe(this,je,Sc).call(this),Pe(this,je,bc).call(this),C(this,Ae).removeObserver(this)}setOptions(t){const s=this.options,o=C(this,Ae);if(this.options=C(this,Tt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Qt(this.options.enabled,C(this,Ae))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Pe(this,je,kc).call(this),C(this,Ae).setOptions(this.options),s._defaulted&&!pc(this.options,s)&&C(this,Tt).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,Ae),observer:this});const l=this.hasListeners();l&&Mp(C(this,Ae),o,this.options,s)&&Pe(this,je,Mo).call(this),this.updateResult(),l&&(C(this,Ae)!==o||Qt(this.options.enabled,C(this,Ae))!==Qt(s.enabled,C(this,Ae))||yr(this.options.staleTime,C(this,Ae))!==yr(s.staleTime,C(this,Ae)))&&Pe(this,je,wc).call(this);const u=Pe(this,je,xc).call(this);l&&(C(this,Ae)!==o||Qt(this.options.enabled,C(this,Ae))!==Qt(s.enabled,C(this,Ae))||u!==C(this,fr))&&Pe(this,je,Ec).call(this,u)}getOptimisticResult(t){const s=C(this,Tt).getQueryCache().build(C(this,Tt),t),o=this.createResult(s,t);return G1(this,o)&&(ee(this,Et,o),ee(this,Ls,this.options),ee(this,Vr,C(this,Ae).state)),o}getCurrentResult(){return C(this,Et)}trackResult(t,s){return new Proxy(t,{get:(o,l)=>(this.trackProp(l),s==null||s(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&C(this,Dn).status==="pending"&&C(this,Dn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,l))})}trackProp(t){C(this,Is).add(t)}getCurrentQuery(){return C(this,Ae)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=C(this,Tt).defaultQueryOptions(t),o=C(this,Tt).getQueryCache().build(C(this,Tt),s);return o.fetch().then(()=>this.createResult(o,s))}fetch(t){return Pe(this,je,Mo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Et)))}createResult(t,s){var ie;const o=C(this,Ae),l=this.options,u=C(this,Et),d=C(this,Vr),h=C(this,Ls),m=t!==o?t.state:C(this,Yo),{state:y}=t;let v={...y},k=!1,O;if(s._optimisticResults){const ue=this.hasListeners(),Ee=!ue&&Ip(t,s),Te=ue&&Mp(t,o,s,l);(Ee||Te)&&(v={...v,...Xg(y.data,t.options)}),s._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:F,errorUpdatedAt:S,status:x}=v;O=v.data;let _=!1;if(s.placeholderData!==void 0&&O===void 0&&x==="pending"){let ue;u!=null&&u.isPlaceholderData&&s.placeholderData===(h==null?void 0:h.placeholderData)?(ue=u.data,_=!0):ue=typeof s.placeholderData=="function"?s.placeholderData((ie=C(this,js))==null?void 0:ie.state.data,C(this,js)):s.placeholderData,ue!==void 0&&(x="success",O=gc(u==null?void 0:u.data,ue,s),k=!0)}if(s.select&&O!==void 0&&!_)if(u&&O===(d==null?void 0:d.data)&&s.select===C(this,Xo))O=C(this,Ds);else try{ee(this,Xo,s.select),O=s.select(O),O=gc(u==null?void 0:u.data,O,s),ee(this,Ds,O),ee(this,dr,null)}catch(ue){ee(this,dr,ue)}C(this,dr)&&(F=C(this,dr),O=C(this,Ds),S=Date.now(),x="error");const D=v.fetchStatus==="fetching",N=x==="pending",L=x==="error",q=N&&D,$=O!==void 0,B={status:x,fetchStatus:v.fetchStatus,isPending:N,isSuccess:x==="success",isError:L,isInitialLoading:q,isLoading:q,data:O,dataUpdatedAt:v.dataUpdatedAt,error:F,errorUpdatedAt:S,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:D,isRefetching:D&&!N,isLoadingError:L&&!$,isPaused:v.fetchStatus==="paused",isPlaceholderData:k,isRefetchError:L&&$,isStale:Zc(t,s),refetch:this.refetch,promise:C(this,Dn),isEnabled:Qt(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ue=B.data!==void 0,Ee=B.status==="error"&&!ue,Te=Se=>{Ee?Se.reject(B.error):ue&&Se.resolve(B.data)},xe=()=>{const Se=ee(this,Dn,B.promise=yc());Te(Se)},J=C(this,Dn);switch(J.status){case"pending":t.queryHash===o.queryHash&&Te(J);break;case"fulfilled":(Ee||B.data!==J.value)&&xe();break;case"rejected":(!Ee||B.error!==J.reason)&&xe();break}}return B}updateResult(){const t=C(this,Et),s=this.createResult(C(this,Ae),this.options);if(ee(this,Vr,C(this,Ae).state),ee(this,Ls,this.options),C(this,Vr).data!==void 0&&ee(this,js,C(this,Ae)),pc(s,t))return;ee(this,Et,s);const o=()=>{if(!t)return!0;const{notifyOnChangeProps:l}=this.options,u=typeof l=="function"?l():l;if(u==="all"||!u&&!C(this,Is).size)return!0;const d=new Set(u??C(this,Is));return this.options.throwOnError&&d.add("error"),Object.keys(C(this,Et)).some(h=>{const p=h;return C(this,Et)[p]!==t[p]&&d.has(p)})};Pe(this,je,Jg).call(this,{listeners:o()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Pe(this,je,_c).call(this)}},Tt=new WeakMap,Ae=new WeakMap,Yo=new WeakMap,Et=new WeakMap,Vr=new WeakMap,Ls=new WeakMap,Dn=new WeakMap,dr=new WeakMap,Xo=new WeakMap,Ds=new WeakMap,js=new WeakMap,qr=new WeakMap,Hr=new WeakMap,fr=new WeakMap,Is=new WeakMap,je=new WeakSet,Mo=function(t){Pe(this,je,kc).call(this);let s=C(this,Ae).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(Pt)),s},wc=function(){Pe(this,je,Sc).call(this);const t=yr(this.options.staleTime,C(this,Ae));if(Xr||C(this,Et).isStale||!hc(t))return;const o=qg(C(this,Et).dataUpdatedAt,t)+1;ee(this,qr,Ir.setTimeout(()=>{C(this,Et).isStale||this.updateResult()},o))},xc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,Ae)):this.options.refetchInterval)??!1},Ec=function(t){Pe(this,je,bc).call(this),ee(this,fr,t),!(Xr||Qt(this.options.enabled,C(this,Ae))===!1||!hc(C(this,fr))||C(this,fr)===0)&&ee(this,Hr,Ir.setInterval(()=>{(this.options.refetchIntervalInBackground||Jc.isFocused())&&Pe(this,je,Mo).call(this)},C(this,fr)))},_c=function(){Pe(this,je,wc).call(this),Pe(this,je,Ec).call(this,Pe(this,je,xc).call(this))},Sc=function(){C(this,qr)&&(Ir.clearTimeout(C(this,qr)),ee(this,qr,void 0))},bc=function(){C(this,Hr)&&(Ir.clearInterval(C(this,Hr)),ee(this,Hr,void 0))},kc=function(){const t=C(this,Tt).getQueryCache().build(C(this,Tt),this.options);if(t===C(this,Ae))return;const s=C(this,Ae);ee(this,Ae,t),ee(this,Yo,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},Jg=function(t){ct.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(C(this,Et))}),C(this,Tt).getQueryCache().notify({query:C(this,Ae),type:"observerResultsUpdated"})})},zm);function K1(r,t){return Qt(t.enabled,r)!==!1&&r.state.data===void 0&&!(r.state.status==="error"&&t.retryOnMount===!1)}function Ip(r,t){return K1(r,t)||r.state.data!==void 0&&Cc(r,t,t.refetchOnMount)}function Cc(r,t,s){if(Qt(t.enabled,r)!==!1&&yr(t.staleTime,r)!=="static"){const o=typeof s=="function"?s(r):s;return o==="always"||o!==!1&&Zc(r,t)}return!1}function Mp(r,t,s,o){return(r!==t||Qt(o.enabled,r)===!1)&&(!s.suspense||r.state.status!=="error")&&Zc(r,s)}function Zc(r,t){return Qt(t.enabled,r)!==!1&&r.isStaleByTime(yr(t.staleTime,r))}function G1(r,t){return!pc(r.getCurrentResult(),t)}function Fp(r){return{onFetch:(t,s)=>{var y,v,k,O,F;const o=t.options,l=(k=(v=(y=t.fetchOptions)==null?void 0:y.meta)==null?void 0:v.fetchMore)==null?void 0:k.direction,u=((O=t.state.data)==null?void 0:O.pages)||[],d=((F=t.state.data)==null?void 0:F.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const m=async()=>{let S=!1;const x=N=>{z1(N,()=>t.signal,()=>S=!0)},_=Wg(t.options,t.fetchOptions),D=async(N,L,q)=>{if(S)return Promise.reject();if(L==null&&N.pages.length)return Promise.resolve(N);const G=(()=>{const Ee={client:t.client,queryKey:t.queryKey,pageParam:L,direction:q?"backward":"forward",meta:t.options.meta};return x(Ee),Ee})(),B=await _(G),{maxPages:ie}=t.options,ue=q?U1:F1;return{pages:ue(N.pages,B,ie),pageParams:ue(N.pageParams,L,ie)}};if(l&&u.length){const N=l==="backward",L=N?Y1:Up,q={pages:u,pageParams:d},$=L(o,q);h=await D(q,$,N)}else{const N=r??u.length;do{const L=p===0?d[0]??o.initialPageParam:Up(o,h);if(p>0&&L==null)break;h=await D(h,L),p++}while(p{var S,x;return(x=(S=t.options).persister)==null?void 0:x.call(S,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=m}}}function Up(r,{pages:t,pageParams:s}){const o=t.length-1;return t.length>0?r.getNextPageParam(t[o],t,s[o],s):void 0}function Y1(r,{pages:t,pageParams:s}){var o;return t.length>0?(o=r.getPreviousPageParam)==null?void 0:o.call(r,t[0],t,s[0],s):void 0}var Jo,yn,yt,Wr,vn,ar,Bm,X1=(Bm=class extends Yg{constructor(t){super();pe(this,vn);pe(this,Jo);pe(this,yn);pe(this,yt);pe(this,Wr);ee(this,Jo,t.client),this.mutationId=t.mutationId,ee(this,yt,t.mutationCache),ee(this,yn,[]),this.state=t.state||J1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,yn).includes(t)||(C(this,yn).push(t),this.clearGcTimeout(),C(this,yt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,yn,C(this,yn).filter(s=>s!==t)),this.scheduleGc(),C(this,yt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,yn).length||(this.state.status==="pending"?this.scheduleGc():C(this,yt).remove(this))}continue(){var t;return((t=C(this,Wr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var d,h,p,m,y,v,k,O,F,S,x,_,D,N,L,q,$,G;const s=()=>{Pe(this,vn,ar).call(this,{type:"continue"})},o={client:C(this,Jo),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Wr,Gg({fn:()=>this.options.mutationFn?this.options.mutationFn(t,o):Promise.reject(new Error("No mutationFn found")),onFail:(B,ie)=>{Pe(this,vn,ar).call(this,{type:"failed",failureCount:B,error:ie})},onPause:()=>{Pe(this,vn,ar).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,yt).canRun(this)}));const l=this.state.status==="pending",u=!C(this,Wr).canStart();try{if(l)s();else{Pe(this,vn,ar).call(this,{type:"pending",variables:t,isPaused:u}),C(this,yt).config.onMutate&&await C(this,yt).config.onMutate(t,this,o);const ie=await((h=(d=this.options).onMutate)==null?void 0:h.call(d,t,o));ie!==this.state.context&&Pe(this,vn,ar).call(this,{type:"pending",context:ie,variables:t,isPaused:u})}const B=await C(this,Wr).start();return await((m=(p=C(this,yt).config).onSuccess)==null?void 0:m.call(p,B,t,this.state.context,this,o)),await((v=(y=this.options).onSuccess)==null?void 0:v.call(y,B,t,this.state.context,o)),await((O=(k=C(this,yt).config).onSettled)==null?void 0:O.call(k,B,null,this.state.variables,this.state.context,this,o)),await((S=(F=this.options).onSettled)==null?void 0:S.call(F,B,null,t,this.state.context,o)),Pe(this,vn,ar).call(this,{type:"success",data:B}),B}catch(B){try{await((_=(x=C(this,yt).config).onError)==null?void 0:_.call(x,B,t,this.state.context,this,o))}catch(ie){Promise.reject(ie)}try{await((N=(D=this.options).onError)==null?void 0:N.call(D,B,t,this.state.context,o))}catch(ie){Promise.reject(ie)}try{await((q=(L=C(this,yt).config).onSettled)==null?void 0:q.call(L,void 0,B,this.state.variables,this.state.context,this,o))}catch(ie){Promise.reject(ie)}try{await((G=($=this.options).onSettled)==null?void 0:G.call($,void 0,B,t,this.state.context,o))}catch(ie){Promise.reject(ie)}throw Pe(this,vn,ar).call(this,{type:"error",error:B}),B}finally{C(this,yt).runNext(this)}}},Jo=new WeakMap,yn=new WeakMap,yt=new WeakMap,Wr=new WeakMap,vn=new WeakSet,ar=function(t){const s=o=>{switch(t.type){case"failed":return{...o,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...o,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:t.error,failureCount:o.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),ct.batch(()=>{C(this,yn).forEach(o=>{o.onMutationUpdate(t)}),C(this,yt).notify({mutation:this,type:"updated",action:t})})},Bm);function J1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var jn,ln,Zo,$m,Z1=($m=class extends ti{constructor(t={}){super();pe(this,jn);pe(this,ln);pe(this,Zo);this.config=t,ee(this,jn,new Set),ee(this,ln,new Map),ee(this,Zo,0)}build(t,s,o){const l=new X1({client:t,mutationCache:this,mutationId:++ma(this,Zo)._,options:t.defaultMutationOptions(s),state:o});return this.add(l),l}add(t){C(this,jn).add(t);const s=Ea(t);if(typeof s=="string"){const o=C(this,ln).get(s);o?o.push(t):C(this,ln).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,jn).delete(t)){const s=Ea(t);if(typeof s=="string"){const o=C(this,ln).get(s);if(o)if(o.length>1){const l=o.indexOf(t);l!==-1&&o.splice(l,1)}else o[0]===t&&C(this,ln).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Ea(t);if(typeof s=="string"){const o=C(this,ln).get(s),l=o==null?void 0:o.find(u=>u.state.status==="pending");return!l||l===t}else return!0}runNext(t){var o;const s=Ea(t);if(typeof s=="string"){const l=(o=C(this,ln).get(s))==null?void 0:o.find(u=>u!==t&&u.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ct.batch(()=>{C(this,jn).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,jn).clear(),C(this,ln).clear()})}getAll(){return Array.from(C(this,jn))}find(t){const s={exact:!0,...t};return this.getAll().find(o=>Np(s,o))}findAll(t={}){return this.getAll().filter(s=>Np(t,s))}notify(t){ct.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return ct.batch(()=>Promise.all(t.map(s=>s.continue().catch(Pt))))}},jn=new WeakMap,ln=new WeakMap,Zo=new WeakMap,$m);function Ea(r){var t;return(t=r.options.scope)==null?void 0:t.id}var wn,Vm,eE=(Vm=class extends ti{constructor(t={}){super();pe(this,wn);this.config=t,ee(this,wn,new Map)}build(t,s,o){const l=s.queryKey,u=s.queryHash??Yc(l,s);let d=this.get(u);return d||(d=new W1({client:t,queryKey:l,queryHash:u,options:t.defaultQueryOptions(s),state:o,defaultOptions:t.getQueryDefaults(l)}),this.add(d)),d}add(t){C(this,wn).has(t.queryHash)||(C(this,wn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=C(this,wn).get(t.queryHash);s&&(t.destroy(),s===t&&C(this,wn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,wn).get(t)}getAll(){return[...C(this,wn).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(o=>Ap(s,o))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(o=>Ap(t,o)):s}notify(t){ct.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){ct.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ct.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},wn=new WeakMap,Vm),He,hr,pr,Ms,Fs,mr,Us,zs,qm,tE=(qm=class{constructor(r={}){pe(this,He);pe(this,hr);pe(this,pr);pe(this,Ms);pe(this,Fs);pe(this,mr);pe(this,Us);pe(this,zs);ee(this,He,r.queryCache||new eE),ee(this,hr,r.mutationCache||new Z1),ee(this,pr,r.defaultOptions||{}),ee(this,Ms,new Map),ee(this,Fs,new Map),ee(this,mr,0)}mount(){ma(this,mr)._++,C(this,mr)===1&&(ee(this,Us,Jc.subscribe(async r=>{r&&(await this.resumePausedMutations(),C(this,He).onFocus())})),ee(this,zs,Ia.subscribe(async r=>{r&&(await this.resumePausedMutations(),C(this,He).onOnline())})))}unmount(){var r,t;ma(this,mr)._--,C(this,mr)===0&&((r=C(this,Us))==null||r.call(this),ee(this,Us,void 0),(t=C(this,zs))==null||t.call(this),ee(this,zs,void 0))}isFetching(r){return C(this,He).findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return C(this,hr).findAll({...r,status:"pending"}).length}getQueryData(r){var s;const t=this.defaultQueryOptions({queryKey:r});return(s=C(this,He).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(r){const t=this.defaultQueryOptions(r),s=C(this,He).build(this,t),o=s.state.data;return o===void 0?this.fetchQuery(r):(r.revalidateIfStale&&s.isStaleByTime(yr(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(r){return C(this,He).findAll(r).map(({queryKey:t,state:s})=>{const o=s.data;return[t,o]})}setQueryData(r,t,s){const o=this.defaultQueryOptions({queryKey:r}),l=C(this,He).get(o.queryHash),u=l==null?void 0:l.state.data,d=j1(t,u);if(d!==void 0)return C(this,He).build(this,o).setData(d,{...s,manual:!0})}setQueriesData(r,t,s){return ct.batch(()=>C(this,He).findAll(r).map(({queryKey:o})=>[o,this.setQueryData(o,t,s)]))}getQueryState(r){var s;const t=this.defaultQueryOptions({queryKey:r});return(s=C(this,He).get(t.queryHash))==null?void 0:s.state}removeQueries(r){const t=C(this,He);ct.batch(()=>{t.findAll(r).forEach(s=>{t.remove(s)})})}resetQueries(r,t){const s=C(this,He);return ct.batch(()=>(s.findAll(r).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...r},t)))}cancelQueries(r,t={}){const s={revert:!0,...t},o=ct.batch(()=>C(this,He).findAll(r).map(l=>l.cancel(s)));return Promise.all(o).then(Pt).catch(Pt)}invalidateQueries(r,t={}){return ct.batch(()=>(C(this,He).findAll(r).forEach(s=>{s.invalidate()}),(r==null?void 0:r.refetchType)==="none"?Promise.resolve():this.refetchQueries({...r,type:(r==null?void 0:r.refetchType)??(r==null?void 0:r.type)??"active"},t)))}refetchQueries(r,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},o=ct.batch(()=>C(this,He).findAll(r).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,s);return s.throwOnError||(u=u.catch(Pt)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(Pt)}fetchQuery(r){const t=this.defaultQueryOptions(r);t.retry===void 0&&(t.retry=!1);const s=C(this,He).build(this,t);return s.isStaleByTime(yr(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(Pt).catch(Pt)}fetchInfiniteQuery(r){return r.behavior=Fp(r.pages),this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(Pt).catch(Pt)}ensureInfiniteQueryData(r){return r.behavior=Fp(r.pages),this.ensureQueryData(r)}resumePausedMutations(){return Ia.isOnline()?C(this,hr).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,He)}getMutationCache(){return C(this,hr)}getDefaultOptions(){return C(this,pr)}setDefaultOptions(r){ee(this,pr,r)}setQueryDefaults(r,t){C(this,Ms).set(Wo(r),{queryKey:r,defaultOptions:t})}getQueryDefaults(r){const t=[...C(this,Ms).values()],s={};return t.forEach(o=>{Qo(r,o.queryKey)&&Object.assign(s,o.defaultOptions)}),s}setMutationDefaults(r,t){C(this,Fs).set(Wo(r),{mutationKey:r,defaultOptions:t})}getMutationDefaults(r){const t=[...C(this,Fs).values()],s={};return t.forEach(o=>{Qo(r,o.mutationKey)&&Object.assign(s,o.defaultOptions)}),s}defaultQueryOptions(r){if(r._defaulted)return r;const t={...C(this,pr).queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return t.queryHash||(t.queryHash=Yc(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Xc&&(t.enabled=!1),t}defaultMutationOptions(r){return r!=null&&r._defaulted?r:{...C(this,pr).mutations,...(r==null?void 0:r.mutationKey)&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){C(this,He).clear(),C(this,hr).clear()}},He=new WeakMap,hr=new WeakMap,pr=new WeakMap,Ms=new WeakMap,Fs=new WeakMap,mr=new WeakMap,Us=new WeakMap,zs=new WeakMap,qm),Zg=R.createContext(void 0),nE=r=>{const t=R.useContext(Zg);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},rE=({client:r,children:t})=>(R.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),w.jsx(Zg.Provider,{value:r,children:t})),ey=R.createContext(!1),sE=()=>R.useContext(ey);ey.Provider;function oE(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}var iE=R.createContext(oE()),aE=()=>R.useContext(iE),lE=(r,t,s)=>{const o=s!=null&&s.state.error&&typeof r.throwOnError=="function"?Qg(r.throwOnError,[s.state.error,s]):r.throwOnError;(r.suspense||r.experimental_prefetchInRender||o)&&(t.isReset()||(r.retryOnMount=!1))},uE=r=>{R.useEffect(()=>{r.clearReset()},[r])},cE=({result:r,errorResetBoundary:t,throwOnError:s,query:o,suspense:l})=>r.isError&&!t.isReset()&&!r.isFetching&&o&&(l&&r.data===void 0||Qg(s,[r.error,o])),dE=r=>{if(r.suspense){const s=l=>l==="static"?l:Math.max(l??1e3,1e3),o=r.staleTime;r.staleTime=typeof o=="function"?(...l)=>s(o(...l)):s(o),typeof r.gcTime=="number"&&(r.gcTime=Math.max(r.gcTime,1e3))}},fE=(r,t)=>r.isLoading&&r.isFetching&&!t,hE=(r,t)=>(r==null?void 0:r.suspense)&&t.isPending,zp=(r,t,s)=>t.fetchOptimistic(r).catch(()=>{s.clearReset()});function pE(r,t,s){var k,O,F,S;const o=sE(),l=aE(),u=nE(),d=u.defaultQueryOptions(r);(O=(k=u.getDefaultOptions().queries)==null?void 0:k._experimental_beforeQuery)==null||O.call(k,d);const h=u.getQueryCache().get(d.queryHash);d._optimisticResults=o?"isRestoring":"optimistic",dE(d),lE(d,l,h),uE(l);const p=!u.getQueryCache().get(d.queryHash),[m]=R.useState(()=>new t(u,d)),y=m.getOptimisticResult(d),v=!o&&r.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(x=>{const _=v?m.subscribe(ct.batchCalls(x)):Pt;return m.updateResult(),_},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),R.useEffect(()=>{m.setOptions(d)},[d,m]),hE(d,y))throw zp(d,m,l);if(cE({result:y,errorResetBoundary:l,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw y.error;if((S=(F=u.getDefaultOptions().queries)==null?void 0:F._experimental_afterQuery)==null||S.call(F,d,y),d.experimental_prefetchInRender&&!Xr&&fE(y,o)){const x=p?zp(d,m,l):h==null?void 0:h.promise;x==null||x.catch(Pt).finally(()=>{m.updateResult()})}return d.notifyOnChangeProps?y:m.trackResult(y)}function mE(r,t){return pE(r,Q1)}const gE=new tE({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Ma(){return Ma=Object.assign?Object.assign.bind():function(r){for(var t=1;t"u")throw new Error(t)}function ty(r,t){if(!r){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function vE(){return Math.random().toString(36).substr(2,8)}function $p(r,t){return{usr:r.state,key:r.key,idx:t}}function Rc(r,t,s,o){return s===void 0&&(s=null),Ma({pathname:typeof r=="string"?r:r.pathname,search:"",hash:""},typeof t=="string"?Va(t):t,{state:s,key:t&&t.key||o||vE()})}function ny(r){let{pathname:t="/",search:s="",hash:o=""}=r;return s&&s!=="?"&&(t+=s.charAt(0)==="?"?s:"?"+s),o&&o!=="#"&&(t+=o.charAt(0)==="#"?o:"#"+o),t}function Va(r){let t={};if(r){let s=r.indexOf("#");s>=0&&(t.hash=r.substr(s),r=r.substr(0,s));let o=r.indexOf("?");o>=0&&(t.search=r.substr(o),r=r.substr(0,o)),r&&(t.pathname=r)}return t}function wE(r,t,s,o){o===void 0&&(o={});let{window:l=document.defaultView,v5Compat:u=!1}=o,d=l.history,h=gr.Pop,p=null,m=y();m==null&&(m=0,d.replaceState(Ma({},d.state,{idx:m}),""));function y(){return(d.state||{idx:null}).idx}function v(){h=gr.Pop;let x=y(),_=x==null?null:x-m;m=x,p&&p({action:h,location:S.location,delta:_})}function k(x,_){h=gr.Push;let D=Rc(S.location,x,_);m=y()+1;let N=$p(D,m),L=S.createHref(D);try{d.pushState(N,"",L)}catch(q){if(q instanceof DOMException&&q.name==="DataCloneError")throw q;l.location.assign(L)}u&&p&&p({action:h,location:S.location,delta:1})}function O(x,_){h=gr.Replace;let D=Rc(S.location,x,_);m=y();let N=$p(D,m),L=S.createHref(D);d.replaceState(N,"",L),u&&p&&p({action:h,location:S.location,delta:0})}function F(x){let _=l.location.origin!=="null"?l.location.origin:l.location.href,D=typeof x=="string"?x:ny(x);return D=D.replace(/ $/,"%20"),Nt(_,"No window.location.(origin|href) available to create URL for href: "+D),new URL(D,_)}let S={get action(){return h},get location(){return r(l,d)},listen(x){if(p)throw new Error("A history only accepts one active listener");return l.addEventListener(Bp,v),p=x,()=>{l.removeEventListener(Bp,v),p=null}},createHref(x){return t(l,x)},createURL:F,encodeLocation(x){let _=F(x);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:k,replace:O,go(x){return d.go(x)}};return S}var Vp;(function(r){r.data="data",r.deferred="deferred",r.redirect="redirect",r.error="error"})(Vp||(Vp={}));function xE(r,t,s){return s===void 0&&(s="/"),EE(r,t,s)}function EE(r,t,s,o){let l=typeof t=="string"?Va(t):t,u=oy(l.pathname||"/",s);if(u==null)return null;let d=ry(r);_E(d);let h=null,p=DE(u);for(let m=0;h==null&&m{let p={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};p.relativePath.startsWith("/")&&(Nt(p.relativePath.startsWith(o),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(o.length));let m=Ts([o,p.relativePath]),y=s.concat(p);u.children&&u.children.length>0&&(Nt(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),ry(u.children,t,y,m)),!(u.path==null&&!u.index)&&t.push({path:m,score:PE(m,u.index),routesMeta:y})};return r.forEach((u,d)=>{var h;if(u.path===""||!((h=u.path)!=null&&h.includes("?")))l(u,d);else for(let p of sy(u.path))l(u,d,p)}),t}function sy(r){let t=r.split("/");if(t.length===0)return[];let[s,...o]=t,l=s.endsWith("?"),u=s.replace(/\?$/,"");if(o.length===0)return l?[u,""]:[u];let d=sy(o.join("/")),h=[];return h.push(...d.map(p=>p===""?u:[u,p].join("/"))),l&&h.push(...d),h.map(p=>r.startsWith("/")&&p===""?"/":p)}function _E(r){r.sort((t,s)=>t.score!==s.score?s.score-t.score:AE(t.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}const SE=/^:[\w-]+$/,bE=3,kE=2,CE=1,RE=10,TE=-2,qp=r=>r==="*";function PE(r,t){let s=r.split("/"),o=s.length;return s.some(qp)&&(o+=TE),t&&(o+=kE),s.filter(l=>!qp(l)).reduce((l,u)=>l+(SE.test(u)?bE:u===""?CE:RE),o)}function AE(r,t){return r.length===t.length&&r.slice(0,-1).every((o,l)=>o===t[l])?r[r.length-1]-t[t.length-1]:0}function NE(r,t,s){let{routesMeta:o}=r,l={},u="/",d=[];for(let h=0;h{let{paramName:k,isOptional:O}=y;if(k==="*"){let S=h[v]||"";d=u.slice(0,u.length-S.length).replace(/(.)\/+$/,"$1")}const F=h[v];return O&&!F?m[k]=void 0:m[k]=(F||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:d,pattern:r}}function LE(r,t,s){t===void 0&&(t=!1),s===void 0&&(s=!0),ty(r==="*"||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));let o=[],l="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,h,p)=>(o.push({paramName:h,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(o.push({paramName:"*"}),l+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?l+="\\/*$":r!==""&&r!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),o]}function DE(r){try{return r.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ty(!1,'The URL path "'+r+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),r}}function oy(r,t){if(t==="/")return r;if(!r.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,o=r.charAt(s);return o&&o!=="/"?null:r.slice(s)||"/"}const jE=r=>r.replace(/\/\/+/g,"/"),Ts=r=>jE(r.join("/")),IE=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/");function ME(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}const iy=["post","put","patch","delete"];new Set(iy);const FE=["get",...iy];new Set(FE);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Fa(){return Fa=Object.assign?Object.assign.bind():function(r){for(var t=1;tObject.assign({},x,{params:Object.assign({},h,x.params),pathname:Ts([p,l.encodeLocation?l.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?p:Ts([p,l.encodeLocation?l.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),u,s,o);return t&&S?R.createElement(ni.Provider,{value:{location:Fa({pathname:"/",search:"",hash:"",state:null,key:"default"},y),navigationType:gr.Pop}},S):S}function qE(){let r=JE(),t=ME(r)?r.status+" "+r.statusText:r instanceof Error?r.message:JSON.stringify(r),s=r instanceof Error?r.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},t),s?R.createElement("pre",{style:l},s):null,null)}const HE=R.createElement(qE,null);class WE extends R.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,s){return s.location!==t.location||s.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:s.error,location:s.location,revalidation:t.revalidation||s.revalidation}}componentDidCatch(t,s){console.error("React Router caught the following error during render",t,s)}render(){return this.state.error!==void 0?R.createElement(qa.Provider,{value:this.props.routeContext},R.createElement(ly.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function QE(r){let{routeContext:t,match:s,children:o}=r,l=R.useContext(UE);return l&&l.static&&l.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=s.route.id),R.createElement(qa.Provider,{value:t},o)}function KE(r,t,s,o){var l;if(t===void 0&&(t=[]),s===void 0&&(s=null),o===void 0&&(o=null),r==null){var u;if(!s)return null;if(s.errors)r=s.matches;else if((u=o)!=null&&u.v7_partialHydration&&t.length===0&&!s.initialized&&s.matches.length>0)r=s.matches;else return null}let d=r,h=(l=s)==null?void 0:l.errors;if(h!=null){let y=d.findIndex(v=>v.route.id&&(h==null?void 0:h[v.route.id])!==void 0);y>=0||Nt(!1),d=d.slice(0,Math.min(d.length,y+1))}let p=!1,m=-1;if(s&&o&&o.v7_partialHydration)for(let y=0;y=0?d=d.slice(0,m+1):d=[d[0]];break}}}return d.reduceRight((y,v,k)=>{let O,F=!1,S=null,x=null;s&&(O=h&&v.route.id?h[v.route.id]:void 0,S=v.route.errorElement||HE,p&&(m<0&&k===0?(ZE("route-fallback"),F=!0,x=null):m===k&&(F=!0,x=v.route.hydrateFallbackElement||null)));let _=t.concat(d.slice(0,k+1)),D=()=>{let N;return O?N=S:F?N=x:v.route.Component?N=R.createElement(v.route.Component,null):v.route.element?N=v.route.element:N=y,R.createElement(QE,{match:v,routeContext:{outlet:y,matches:_,isDataRoute:s!=null},children:N})};return s&&(v.route.ErrorBoundary||v.route.errorElement||k===0)?R.createElement(WE,{location:s.location,revalidation:s.revalidation,component:S,error:O,children:D(),routeContext:{outlet:null,matches:_,isDataRoute:!0}}):D()},null)}var uy=(function(r){return r.UseBlocker="useBlocker",r.UseLoaderData="useLoaderData",r.UseActionData="useActionData",r.UseRouteError="useRouteError",r.UseNavigation="useNavigation",r.UseRouteLoaderData="useRouteLoaderData",r.UseMatches="useMatches",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r.UseRouteId="useRouteId",r})(uy||{});function GE(r){let t=R.useContext(zE);return t||Nt(!1),t}function YE(r){let t=R.useContext(qa);return t||Nt(!1),t}function XE(r){let t=YE(),s=t.matches[t.matches.length-1];return s.route.id||Nt(!1),s.route.id}function JE(){var r;let t=R.useContext(ly),s=GE(uy.UseRouteError),o=XE();return t!==void 0?t:(r=s.errors)==null?void 0:r[o]}const Hp={};function ZE(r,t,s){Hp[r]||(Hp[r]=!0)}function e_(r,t){r==null||r.v7_startTransition,r==null||r.v7_relativeSplatPath}function Fo(r){Nt(!1)}function t_(r){let{basename:t="/",children:s=null,location:o,navigationType:l=gr.Pop,navigator:u,static:d=!1,future:h}=r;ed()&&Nt(!1);let p=t.replace(/^\/*/,"/"),m=R.useMemo(()=>({basename:p,navigator:u,static:d,future:Fa({v7_relativeSplatPath:!1},h)}),[p,h,u,d]);typeof o=="string"&&(o=Va(o));let{pathname:y="/",search:v="",hash:k="",state:O=null,key:F="default"}=o,S=R.useMemo(()=>{let x=oy(y,p);return x==null?null:{location:{pathname:x,search:v,hash:k,state:O,key:F},navigationType:l}},[p,y,v,k,O,F,l]);return S==null?null:R.createElement(ay.Provider,{value:m},R.createElement(ni.Provider,{children:s,value:S}))}function n_(r){let{children:t,location:s}=r;return $E(Tc(t),s)}new Promise(()=>{});function Tc(r,t){t===void 0&&(t=[]);let s=[];return R.Children.forEach(r,(o,l)=>{if(!R.isValidElement(o))return;let u=[...t,l];if(o.type===R.Fragment){s.push.apply(s,Tc(o.props.children,u));return}o.type!==Fo&&Nt(!1),!o.props.index||!o.props.children||Nt(!1);let d={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(d.children=Tc(o.props.children,u)),s.push(d)}),s}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const r_="6";try{window.__reactRouterVersion=r_}catch{}const s_="startTransition",Wp=Wm[s_];function o_(r){let{basename:t,children:s,future:o,window:l}=r,u=R.useRef();u.current==null&&(u.current=yE({window:l,v5Compat:!0}));let d=u.current,[h,p]=R.useState({action:d.action,location:d.location}),{v7_startTransition:m}=o||{},y=R.useCallback(v=>{m&&Wp?Wp(()=>p(v)):p(v)},[p,m]);return R.useLayoutEffect(()=>d.listen(y),[d,y]),R.useEffect(()=>e_(o),[o]),R.createElement(t_,{basename:t,children:s,location:h.location,navigationType:h.action,navigator:d,future:o})}var Qp;(function(r){r.UseScrollRestoration="useScrollRestoration",r.UseSubmit="useSubmit",r.UseSubmitFetcher="useSubmitFetcher",r.UseFetcher="useFetcher",r.useViewTransitionState="useViewTransitionState"})(Qp||(Qp={}));var Kp;(function(r){r.UseFetcher="useFetcher",r.UseFetchers="useFetchers",r.UseScrollRestoration="useScrollRestoration"})(Kp||(Kp={}));function cy(r,t){return function(){return r.apply(t,arguments)}}const{toString:i_}=Object.prototype,{getPrototypeOf:Bs}=Object,{iterator:ri,toStringTag:dy}=Symbol,Ua=(({hasOwnProperty:r})=>(t,s)=>r.call(t,s))(Object.prototype),Ko=(r,t)=>{let s=r;const o=[];for(;s!=null&&s!==Object.prototype;){if(o.indexOf(s)!==-1)return!1;if(o.push(s),Ua(s,t))return!0;s=Bs(s)}return!1},a_=(r,t)=>r!=null&&Ko(r,t)?r[t]:void 0,nd=(r=>t=>{const s=i_.call(t);return r[s]||(r[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),cn=r=>(r=r.toLowerCase(),t=>nd(t)===r),Ha=r=>t=>typeof t===r,{isArray:Jr}=Array,$s=Ha("undefined");function qs(r){return r!==null&&!$s(r)&&r.constructor!==null&&!$s(r.constructor)&&At(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const fy=cn("ArrayBuffer");function l_(r){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(r):t=r&&r.buffer&&fy(r.buffer),t}const u_=Ha("string"),At=Ha("function"),hy=Ha("number"),Hs=r=>r!==null&&typeof r=="object",c_=r=>r===!0||r===!1,Ta=r=>{if(!Hs(r))return!1;const t=Bs(r);return(t===null||t===Object.prototype||Bs(t)===null)&&!Ko(r,dy)&&!Ko(r,ri)},d_=r=>{if(!Hs(r)||qs(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},f_=cn("Date"),h_=cn("File"),p_=r=>!!(r&&typeof r.uri<"u"),m_=r=>r&&typeof r.getParts<"u",g_=cn("Blob"),y_=cn("FileList"),v_=r=>Hs(r)&&At(r.pipe);function w_(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Gp=w_(),Yp=typeof Gp.FormData<"u"?Gp.FormData:void 0,x_=r=>{if(!r)return!1;if(Yp&&r instanceof Yp)return!0;const t=Bs(r);if(!t||t===Object.prototype||!At(r.append))return!1;const s=nd(r);return s==="formdata"||s==="object"&&At(r.toString)&&r.toString()==="[object FormData]"},E_=cn("URLSearchParams"),[__,S_,b_,k_]=["ReadableStream","Request","Response","Headers"].map(cn),C_=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function si(r,t,{allOwnKeys:s=!1}={}){if(r===null||typeof r>"u")return;let o,l;if(typeof r!="object"&&(r=[r]),Jr(r))for(o=0,l=r.length;o0;)if(l=s[o],t===l.toLowerCase())return l;return null}const Mr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,my=r=>!$s(r)&&r!==Mr;function Pc(...r){const{caseless:t,skipUndefined:s}=my(this)&&this||{},o={},l=(u,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=t&&typeof d=="string"&&py(o,d)||d,p=Ua(o,h)?o[h]:void 0;Ta(p)&&Ta(u)?o[h]=Pc(p,u):Ta(u)?o[h]=Pc({},u):Jr(u)?o[h]=u.slice():(!s||!$s(u))&&(o[h]=u)};for(let u=0,d=r.length;u(si(t,(l,u)=>{s&&At(l)?Object.defineProperty(r,u,{__proto__:null,value:cy(l,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,u,{__proto__:null,value:l,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),r),T_=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),P_=(r,t,s,o)=>{r.prototype=Object.create(t.prototype,o),Object.defineProperty(r.prototype,"constructor",{__proto__:null,value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{__proto__:null,value:t.prototype}),s&&Object.assign(r.prototype,s)},A_=(r,t,s,o)=>{let l,u,d;const h={};if(t=t||{},r==null)return t;do{for(l=Object.getOwnPropertyNames(r),u=l.length;u-- >0;)d=l[u],(!o||o(d,r,t))&&!h[d]&&(t[d]=r[d],h[d]=!0);r=s!==!1&&Bs(r)}while(r&&(!s||s(r,t))&&r!==Object.prototype);return t},N_=(r,t,s)=>{r=String(r),(s===void 0||s>r.length)&&(s=r.length),s-=t.length;const o=r.indexOf(t,s);return o!==-1&&o===s},O_=r=>{if(!r)return null;if(Jr(r))return r;let t=r.length;if(!hy(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=r[t];return s},L_=(r=>t=>r&&t instanceof r)(typeof Uint8Array<"u"&&Bs(Uint8Array)),D_=(r,t)=>{const o=(r&&r[ri]).call(r);let l;for(;(l=o.next())&&!l.done;){const u=l.value;t.call(r,u[0],u[1])}},j_=(r,t)=>{let s;const o=[];for(;(s=r.exec(t))!==null;)o.push(s);return o},I_=cn("HTMLFormElement"),M_=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,o,l){return o.toUpperCase()+l}),{propertyIsEnumerable:F_}=Object.prototype,U_=cn("RegExp"),gy=(r,t)=>{const s=Object.getOwnPropertyDescriptors(r),o={};si(s,(l,u)=>{let d;(d=t(l,u,r))!==!1&&(o[u]=d||l)}),Object.defineProperties(r,o)},z_=r=>{gy(r,(t,s)=>{if(At(r)&&["arguments","caller","callee"].includes(s))return!1;const o=r[s];if(At(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},B_=(r,t)=>{const s={},o=l=>{l.forEach(u=>{s[u]=!0})};return Jr(r)?o(r):o(String(r).split(t)),s},$_=()=>{},V_=(r,t)=>r!=null&&Number.isFinite(r=+r)?r:t;function q_(r){return!!(r&&At(r.append)&&r[dy]==="FormData"&&r[ri])}const H_=r=>{const t=new WeakSet,s=o=>{if(Hs(o)){if(t.has(o))return;if(qs(o))return o;if(!("toJSON"in o)){t.add(o);const l=Jr(o)?[]:{};return si(o,(u,d)=>{const h=s(u);!$s(h)&&(l[d]=h)}),t.delete(o),l}}return o};return s(r)},W_=cn("AsyncFunction"),Q_=r=>r&&(Hs(r)||At(r))&&At(r.then)&&At(r.catch),yy=((r,t)=>r?setImmediate:t?((s,o)=>(Mr.addEventListener("message",({source:l,data:u})=>{l===Mr&&u===s&&o.length&&o.shift()()},!1),l=>{o.push(l),Mr.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",At(Mr.postMessage)),K_=typeof queueMicrotask<"u"?queueMicrotask.bind(Mr):typeof process<"u"&&process.nextTick||yy,vy=r=>r!=null&&At(r[ri]),G_=r=>r!=null&&Ko(r,ri)&&vy(r),A={isArray:Jr,isArrayBuffer:fy,isBuffer:qs,isFormData:x_,isArrayBufferView:l_,isString:u_,isNumber:hy,isBoolean:c_,isObject:Hs,isPlainObject:Ta,isEmptyObject:d_,isReadableStream:__,isRequest:S_,isResponse:b_,isHeaders:k_,isUndefined:$s,isDate:f_,isFile:h_,isReactNativeBlob:p_,isReactNative:m_,isBlob:g_,isRegExp:U_,isFunction:At,isStream:v_,isURLSearchParams:E_,isTypedArray:L_,isFileList:y_,forEach:si,merge:Pc,extend:R_,trim:C_,stripBOM:T_,inherits:P_,toFlatObject:A_,kindOf:nd,kindOfTest:cn,endsWith:N_,toArray:O_,forEachEntry:D_,matchAll:j_,isHTMLForm:I_,hasOwnProperty:Ua,hasOwnProp:Ua,hasOwnInPrototypeChain:Ko,getSafeProp:a_,reduceDescriptors:gy,freezeMethods:z_,toObjectSet:B_,toCamelCase:M_,noop:$_,toFiniteNumber:V_,findKey:py,global:Mr,isContextDefined:my,isSpecCompliantForm:q_,toJSONObject:H_,isAsyncFn:W_,isThenable:Q_,setImmediate:yy,asap:K_,isIterable:vy,isSafeIterable:G_},Y_=A.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),X_=r=>{const t={};let s,o,l;return r&&r.split(` `).forEach(function(d){l=d.indexOf(":"),s=d.substring(0,l).trim().toLowerCase(),o=d.substring(l+1).trim(),!(!s||t[s]&&Y_[s])&&(s==="set-cookie"?t[s]?t[s].push(o):t[s]=[o]:t[s]=t[s]?t[s]+", "+o:o)}),t};function J_(r){let t=0,s=r.length;for(;tt;){const o=r.charCodeAt(s-1);if(o!==9&&o!==32)break;s-=1}return t===0&&s===r.length?r:r.slice(t,s)}const Z_=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),eS=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function rd(r,t){return A.isArray(r)?r.map(s=>rd(s,t)):J_(String(r).replace(t,""))}const tS=r=>rd(r,Z_),nS=r=>rd(r,eS);function wy(r){const t=Object.create(null);return A.forEach(r.toJSON(),(s,o)=>{t[o]=nS(s)}),t}const Xp=Symbol("internals");function Do(r){return r&&String(r).trim().toLowerCase()}function Pa(r){return r===!1||r==null?r:A.isArray(r)?r.map(Pa):tS(String(r))}function rS(r){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=s.exec(r);)t[o[1]]=o[2];return t}const sS=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function Gu(r,t,s,o,l){if(A.isFunction(o))return o.call(this,t,s);if(l&&(t=s),!!A.isString(t)){if(A.isString(o))return t.indexOf(o)!==-1;if(A.isRegExp(o))return o.test(t)}}function oS(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,s,o)=>s.toUpperCase()+o)}function iS(r,t){const s=A.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(r,o+s,{__proto__:null,value:function(l,u,d){return this[o].call(this,t,l,u,d)},configurable:!0})})}let vt=class{constructor(t){t&&this.set(t)}set(t,s,o){const l=this;function u(h,p,m){const y=Do(p);if(!y)return;const v=A.findKey(l,y);(!v||l[v]===void 0||m===!0||m===void 0&&l[v]!==!1)&&(l[v||p]=Pa(h))}const d=(h,p)=>A.forEach(h,(m,y)=>u(m,y,p));if(A.isPlainObject(t)||t instanceof this.constructor)d(t,s);else if(A.isString(t)&&(t=t.trim())&&!sS(t))d(X_(t),s);else if(A.isObject(t)&&A.isSafeIterable(t)){let h=Object.create(null),p,m;for(const y of t){if(!A.isArray(y))throw new TypeError("Object iterator must return a key-value pair");m=y[0],A.hasOwnProp(h,m)?(p=h[m],h[m]=A.isArray(p)?[...p,y[1]]:[p,y[1]]):h[m]=y[1]}d(h,s)}else t!=null&&u(s,t,o);return this}get(t,s){if(t=Do(t),t){const o=A.findKey(this,t);if(o){const l=this[o];if(!s)return l;if(s===!0)return rS(l);if(A.isFunction(s))return s.call(this,l,o);if(A.isRegExp(s))return s.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,s){if(t=Do(t),t){const o=A.findKey(this,t);return!!(o&&this[o]!==void 0&&(!s||Gu(this,this[o],o,s)))}return!1}delete(t,s){const o=this;let l=!1;function u(d){if(d=Do(d),d){const h=A.findKey(o,d);h&&(!s||Gu(o,o[h],h,s))&&(delete o[h],l=!0)}}return A.isArray(t)?t.forEach(u):u(t),l}clear(t){const s=Object.keys(this);let o=s.length,l=!1;for(;o--;){const u=s[o];(!t||Gu(this,this[u],u,t,!0))&&(delete this[u],l=!0)}return l}normalize(t){const s=this,o={};return A.forEach(this,(l,u)=>{const d=A.findKey(o,u);if(d){s[d]=Pa(l),delete s[u];return}const h=t?oS(u):String(u).trim();h!==u&&delete s[u],s[h]=Pa(l),o[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const s=Object.create(null);return A.forEach(this,(o,l)=>{o!=null&&o!==!1&&(s[l]=t&&A.isArray(o)?o.join(", "):o)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,s])=>t+": "+s).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){const o=new this(t);return s.forEach(l=>o.set(l)),o}static accessor(t){const o=(this[Xp]=this[Xp]={accessors:{}}).accessors,l=this.prototype;function u(d){const h=Do(d);o[h]||(iS(l,d),o[h]=!0)}return A.isArray(t)?t.forEach(u):u(t),this}};vt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);A.reduceDescriptors(vt.prototype,({value:r},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(o){this[s]=o}}});A.freezeMethods(vt);const aS="[REDACTED ****]";function lS(r){if(A.hasOwnProp(r,"toJSON"))return!0;let t=Object.getPrototypeOf(r);for(;t&&t!==Object.prototype;){if(A.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function uS(r,t){const s=new Set(t.map(u=>String(u).toLowerCase())),o=[],l=u=>{if(u===null||typeof u!="object"||A.isBuffer(u))return u;if(o.indexOf(u)!==-1)return;u instanceof vt&&(u=u.toJSON()),o.push(u);let d;if(A.isArray(u))d=[],u.forEach((h,p)=>{const m=l(h);A.isUndefined(m)||(d[p]=m)});else{if(!A.isPlainObject(u)&&lS(u))return o.pop(),u;d=Object.create(null);for(const[h,p]of Object.entries(u)){const m=s.has(h.toLowerCase())?aS:l(p);A.isUndefined(m)||(d[h]=m)}}return o.pop(),d};return l(r)}let X=class xy extends Error{static from(t,s,o,l,u,d){const h=new xy(t.message,s||t.code,o,l,u);return Object.defineProperty(h,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),h.name=t.name,t.status!=null&&h.status==null&&(h.status=t.status),d&&Object.assign(h,d),h}constructor(t,s,o,l,u){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),o&&(this.config=o),l&&(this.request=l),u&&(this.response=u,this.status=u.status)}toJSON(){const t=this.config,s=t&&A.hasOwnProp(t,"redact")?t.redact:void 0,o=A.isArray(s)&&s.length>0?uS(t,s):A.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};X.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";X.ERR_BAD_OPTION="ERR_BAD_OPTION";X.ECONNABORTED="ECONNABORTED";X.ETIMEDOUT="ETIMEDOUT";X.ECONNREFUSED="ECONNREFUSED";X.ERR_NETWORK="ERR_NETWORK";X.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";X.ERR_DEPRECATED="ERR_DEPRECATED";X.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";X.ERR_BAD_REQUEST="ERR_BAD_REQUEST";X.ERR_CANCELED="ERR_CANCELED";X.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";X.ERR_INVALID_URL="ERR_INVALID_URL";X.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const cS=null,Ey=100;function Ac(r){return A.isPlainObject(r)||A.isArray(r)}function _y(r){return A.endsWith(r,"[]")?r.slice(0,-2):r}function Yu(r,t,s){return r?r.concat(t).map(function(l,u){return l=_y(l),!s&&u?"["+l+"]":l}).join(s?".":""):t}function dS(r){return A.isArray(r)&&!r.some(Ac)}const fS=A.toFlatObject(A,{},null,function(t){return/^is[A-Z]/.test(t)});function Wa(r,t,s){if(!A.isObject(r))throw new TypeError("target must be an object");t=t||new FormData,s=A.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(D,N){return!A.isUndefined(N[D])});const o=s.metaTokens,l=s.visitor||F,u=s.dots,d=s.indexes,h=s.Blob||typeof Blob<"u"&&Blob,p=s.maxDepth===void 0?Ey:s.maxDepth,m=h&&A.isSpecCompliantForm(t),y=[];if(!A.isFunction(l))throw new TypeError("visitor must be a function");function v(_){if(_===null)return"";if(A.isDate(_))return _.toISOString();if(A.isBoolean(_))return _.toString();if(!m&&A.isBlob(_))throw new X("Blob is not supported. Use a Buffer instead.");if(A.isArrayBuffer(_)||A.isTypedArray(_)){if(m&&typeof h=="function")return new h([_]);if(typeof Buffer<"u")return Buffer.from(_);throw new X("Blob is not supported. Use a Buffer instead.",X.ERR_NOT_SUPPORT)}return _}function k(_){if(_>p)throw new X("Object is too deeply nested ("+_+" levels). Max depth: "+p,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function O(_,D){if(p===1/0)return JSON.stringify(_);const N=[];return JSON.stringify(_,function(q,$){if(!A.isObject($))return $;for(;N.length&&N[N.length-1]!==this;)N.pop();return N.push($),k(D+N.length-1),$})}function F(_,D,N){let L=_;if(A.isReactNative(t)&&A.isReactNativeBlob(_))return t.append(Yu(N,D,u),v(_)),!1;if(_&&!N&&typeof _=="object"){if(A.endsWith(D,"{}"))D=o?D:D.slice(0,-2),_=O(_,1);else if(A.isArray(_)&&dS(_)||(A.isFileList(_)||A.endsWith(D,"[]"))&&(L=A.toArray(_)))return D=_y(D),L.forEach(function($,G){!(A.isUndefined($)||$===null)&&t.append(d===!0?Yu([D],G,u):d===null?D:D+"[]",v($))}),!1}return Ac(_)?!0:(t.append(Yu(N,D,u),v(_)),!1)}const S=Object.assign(fS,{defaultVisitor:F,convertValue:v,isVisitable:Ac});function x(_,D,N=0){if(!A.isUndefined(_)){if(k(N),y.indexOf(_)!==-1)throw new Error("Circular reference detected in "+D.join("."));y.push(_),A.forEach(_,function(q,$){(!(A.isUndefined(q)||q===null)&&l.call(t,q,A.isString($)?$.trim():$,D,S))===!0&&x(q,D?D.concat($):[$],N+1)}),y.pop()}}if(!A.isObject(r))throw new TypeError("data must be an object");return x(r),t}function Jp(r){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(r).replace(/[!'()~]|%20/g,function(o){return t[o]})}function sd(r,t){this._pairs=[],r&&Wa(r,this,t)}const Sy=sd.prototype;Sy.append=function(t,s){this._pairs.push([t,s])};Sy.toString=function(t){const s=t?o=>t.call(this,o,Jp):Jp;return this._pairs.map(function(l){return s(l[0])+"="+s(l[1])},"").join("&")};function hS(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function by(r,t,s){if(!t)return r;r=r||"";const o=A.isFunction(s)?{serialize:s}:s,l=A.getSafeProp(o,"encode")||hS,u=A.getSafeProp(o,"serialize");let d;if(u?d=u(t,o):d=A.isURLSearchParams(t)?t.toString():new sd(t,o).toString(l),d){const h=r.indexOf("#");h!==-1&&(r=r.slice(0,h)),r+=(r.indexOf("?")===-1?"?":"&")+d}return r}class Zp{constructor(){this.handlers=[]}use(t,s,o){return this.handlers.push({fulfilled:t,rejected:s,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){A.forEach(this.handlers,function(o){o!==null&&t(o)})}}const od={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},pS=typeof URLSearchParams<"u"?URLSearchParams:sd,mS=typeof FormData<"u"?FormData:null,gS=typeof Blob<"u"?Blob:null,yS={isBrowser:!0,classes:{URLSearchParams:pS,FormData:mS,Blob:gS},protocols:["http","https","file","blob","url","data"]},id=typeof window<"u"&&typeof document<"u",Nc=typeof navigator=="object"&&navigator||void 0,vS=id&&(!Nc||["ReactNative","NativeScript","NS"].indexOf(Nc.product)<0),wS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xS=id&&window.location.href||"http://localhost",ES=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:id,hasStandardBrowserEnv:vS,hasStandardBrowserWebWorkerEnv:wS,navigator:Nc,origin:xS},Symbol.toStringTag,{value:"Module"})),dt={...ES,...yS};function _S(r,t){return Wa(r,new dt.classes.URLSearchParams,{visitor:function(s,o,l,u){return dt.isNode&&A.isBuffer(s)?(this.append(o,s.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...t})}const em=Ey;function ky(r){if(r>em)throw new X("FormData field is too deeply nested ("+r+" levels). Max depth: "+em,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function SS(r){const t=[],s=/\w+|\[(\w*)]/g;let o;for(;(o=s.exec(r))!==null;)ky(t.length),t.push(o[0]==="[]"?"":o[1]||o[0]);return t}function bS(r){const t={},s=Object.keys(r);let o;const l=s.length;let u;for(o=0;o=s.length;return d=!d&&A.isArray(l)?l.length:d,p?(A.hasOwnProp(l,d)?l[d]=A.isArray(l[d])?l[d].concat(o):[l[d],o]:l[d]=o,!h):((!A.hasOwnProp(l,d)||!A.isObject(l[d]))&&(l[d]=[]),t(s,o,l[d],u)&&A.isArray(l[d])&&(l[d]=bS(l[d])),!h)}if(A.isFormData(r)&&A.isFunction(r.entries)){const s={};return A.forEachEntry(r,(o,l)=>{t(SS(o),l,s,0)}),s}return null}const ks=(r,t)=>r!=null&&A.hasOwnProp(r,t)?r[t]:void 0;function kS(r,t,s){if(A.isString(r))try{return(t||JSON.parse)(r),A.trim(r)}catch(o){if(o.name!=="SyntaxError")throw o}return(s||JSON.stringify)(r)}const oi={transitional:od,adapter:["xhr","http","fetch"],transformRequest:[function(t,s){const o=s.getContentType()||"",l=o.indexOf("application/json")>-1,u=A.isObject(t);if(u&&A.isHTMLForm(t)&&(t=new FormData(t)),A.isFormData(t))return l?JSON.stringify(Cy(t)):t;if(A.isArrayBuffer(t)||A.isBuffer(t)||A.isStream(t)||A.isFile(t)||A.isBlob(t)||A.isReadableStream(t))return t;if(A.isArrayBufferView(t))return t.buffer;if(A.isURLSearchParams(t))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(u){const p=ks(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return _S(t,p).toString();if((h=A.isFileList(t))||o.indexOf("multipart/form-data")>-1){const m=ks(this,"env"),y=m&&m.FormData;return Wa(h?{"files[]":t}:t,y&&new y,p)}}return u||l?(s.setContentType("application/json",!1),kS(t)):t}],transformResponse:[function(t){const s=ks(this,"transitional")||oi.transitional,o=s&&s.forcedJSONParsing,l=ks(this,"responseType"),u=l==="json";if(A.isResponse(t)||A.isReadableStream(t))return t;if(t&&A.isString(t)&&(o&&!l||u)){const h=!(s&&s.silentJSONParsing)&&u;try{return JSON.parse(t,ks(this,"parseReviver"))}catch(p){if(h)throw p.name==="SyntaxError"?X.from(p,X.ERR_BAD_RESPONSE,this,null,ks(this,"response")):p}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:dt.classes.FormData,Blob:dt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch","query"],r=>{oi.headers[r]={}});function Xu(r,t){const s=this||oi,o=t||s,l=vt.from(o.headers);let u=o.data;return A.forEach(r,function(h){u=h.call(s,u,l.normalize(),t?t.status:void 0)}),l.normalize(),u}function Ry(r){return!!(r&&r.__CANCEL__)}let ii=class extends X{constructor(t,s,o){super(t??"canceled",X.ERR_CANCELED,s,o),this.name="CanceledError",this.__CANCEL__=!0}};function Ty(r,t,s){const o=s.config.validateStatus;!s.status||!o||o(s.status)?r(s):t(new X("Request failed with status code "+s.status,s.status>=400&&s.status<500?X.ERR_BAD_REQUEST:X.ERR_BAD_RESPONSE,s.config,s.request,s))}function CS(r){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(r);return t&&t[1]||""}function RS(r,t){r=r||10;const s=new Array(r),o=new Array(r);let l=0,u=0,d;return t=t!==void 0?t:1e3,function(p){const m=Date.now(),y=o[u];d||(d=m),s[l]=p,o[l]=m;let v=u,k=0;for(;v!==l;)k+=s[v++],v=v%r;if(l=(l+1)%r,l===u&&(u=(u+1)%r),m-d{s=y,l=null,u&&(clearTimeout(u),u=null),r(...m)};return[(...m)=>{const y=Date.now(),v=y-s;v>=o?d(m,y):(l=m,u||(u=setTimeout(()=>{u=null,d(l)},o-v)))},()=>l&&d(l)]}const za=(r,t,s=3)=>{let o=0;const l=RS(50,250);return TS(u=>{if(!u||typeof u.loaded!="number")return;const d=u.loaded,h=u.lengthComputable?u.total:void 0,p=h!=null?Math.min(d,h):d,m=Math.max(0,p-o),y=l(m);o=Math.max(o,p);const v={loaded:p,total:h,progress:h?p/h:void 0,bytes:m,rate:y||void 0,estimated:y&&h?(h-p)/y:void 0,event:u,lengthComputable:h!=null,[t?"download":"upload"]:!0};r(v)},s)},tm=(r,t)=>{const s=r!=null;return[o=>t[0]({lengthComputable:s,total:r,loaded:o}),t[1]]},nm=r=>(...t)=>A.asap(()=>r(...t)),PS=dt.hasStandardBrowserEnv?((r,t)=>s=>(s=new URL(s,dt.origin),r.protocol===s.protocol&&r.host===s.host&&(t||r.port===s.port)))(new URL(dt.origin),dt.navigator&&/(msie|trident)/i.test(dt.navigator.userAgent)):()=>!0,AS=dt.hasStandardBrowserEnv?{write(r,t,s,o,l,u,d){if(typeof document>"u")return;const h=[`${r}=${encodeURIComponent(t)}`];A.isNumber(s)&&h.push(`expires=${new Date(s).toUTCString()}`),A.isString(o)&&h.push(`path=${o}`),A.isString(l)&&h.push(`domain=${l}`),u===!0&&h.push("secure"),A.isString(d)&&h.push(`SameSite=${d}`),document.cookie=h.join("; ")},read(r){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let s=0;sr instanceof vt?{...r}:r;function Zr(r,t){r=r||{},t=t||{};const s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(y,v,k,O){return A.isPlainObject(y)&&A.isPlainObject(v)?A.merge.call({caseless:O},y,v):A.isPlainObject(v)?A.merge({},v):A.isArray(v)?v.slice():v}function l(y,v,k,O){if(A.isUndefined(v)){if(!A.isUndefined(y))return o(void 0,y,k,O)}else return o(y,v,k,O)}function u(y,v){if(!A.isUndefined(v))return o(void 0,v)}function d(y,v){if(A.isUndefined(v)){if(!A.isUndefined(y))return o(void 0,y)}else return o(void 0,v)}function h(y){const v=A.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!A.isUndefined(v))if(A.isPlainObject(v)){if(A.hasOwnProp(v,y))return v[y]}else return;const k=A.hasOwnProp(r,"transitional")?r.transitional:void 0;if(A.isPlainObject(k)&&A.hasOwnProp(k,y))return k[y]}function p(y,v,k){if(A.hasOwnProp(t,k))return o(y,v);if(A.hasOwnProp(r,k))return o(void 0,y)}const m={url:u,method:u,data:u,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,allowedSocketPaths:d,responseEncoding:d,validateStatus:p,headers:(y,v,k)=>l(sm(y),sm(v),k,!0)};return A.forEach(Object.keys({...r,...t}),function(v){if(v==="__proto__"||v==="constructor"||v==="prototype")return;const k=A.hasOwnProp(m,v)?m[v]:l,O=A.hasOwnProp(r,v)?r[v]:void 0,F=A.hasOwnProp(t,v)?t[v]:void 0,S=k(O,F,v);A.isUndefined(S)&&k!==p||(s[v]=S)}),A.hasOwnProp(t,"validateStatus")&&A.isUndefined(t.validateStatus)&&h("validateStatusUndefinedResolves")===!1&&(A.hasOwnProp(r,"validateStatus")?s.validateStatus=o(void 0,r.validateStatus):delete s.validateStatus),s}const MS=["content-type","content-length"];function FS(r,t,s){if(s!=="content-only"){r.set(t);return}Object.entries(t||{}).forEach(([o,l])=>{MS.includes(o.toLowerCase())&&r.set(o,l)})}const US=r=>encodeURIComponent(r).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16)));function Ay(r){const t=Zr({},r),s=k=>A.hasOwnProp(t,k)?t[k]:void 0,o=s("data");let l=s("withXSRFToken");const u=s("xsrfHeaderName"),d=s("xsrfCookieName");let h=s("headers");const p=s("auth"),m=s("baseURL"),y=s("allowAbsoluteUrls"),v=s("url");if(t.headers=h=vt.from(h),t.url=by(Py(m,v,y,t),s("params"),s("paramsSerializer")),p){const k=A.getSafeProp(p,"username")||"",O=A.getSafeProp(p,"password")||"";try{h.set("Authorization","Basic "+btoa(k+":"+(O?US(O):"")))}catch(F){throw X.from(F,X.ERR_BAD_OPTION_VALUE,r)}}if(A.isFormData(o)&&(dt.hasStandardBrowserEnv||dt.hasStandardBrowserWebWorkerEnv||A.isReactNative(o)?h.setContentType(void 0):A.isFunction(o.getHeaders)&&FS(h,o.getHeaders(),s("formDataHeaderPolicy"))),dt.hasStandardBrowserEnv&&(A.isFunction(l)&&(l=l(t)),l===!0||l==null&&PS(t.url))){const O=u&&d&&AS.read(d);O&&h.set(u,O)}return t}const zS=typeof XMLHttpRequest<"u",BS=zS&&function(r){return new Promise(function(s,o){const l=Ay(r);let u=l.data;const d=vt.from(l.headers).normalize();let{responseType:h,onUploadProgress:p,onDownloadProgress:m}=l,y,v,k,O,F;function S(){O&&O(),F&&F(),l.cancelToken&&l.cancelToken.unsubscribe(y),l.signal&&l.signal.removeEventListener("abort",y)}let x=new XMLHttpRequest;x.open(l.method.toUpperCase(),l.url,!0),x.timeout=l.timeout;function _(){if(!x)return;const N=vt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),q={data:!h||h==="text"||h==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:N,config:r,request:x};Ty(function(G){s(G),S()},function(G){o(G),S()},q),x=null}"onloadend"in x?x.onloadend=_:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(_)},x.onabort=function(){x&&(o(new X("Request aborted",X.ECONNABORTED,r,x)),S(),x=null)},x.onerror=function(L){const q=L&&L.message?L.message:"Network Error",$=new X(q,X.ERR_NETWORK,r,x);$.event=L||null,o($),S(),x=null},x.ontimeout=function(){let L=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const q=l.transitional||od;l.timeoutErrorMessage&&(L=l.timeoutErrorMessage),o(new X(L,q.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,r,x)),S(),x=null},u===void 0&&d.setContentType(null),"setRequestHeader"in x&&A.forEach(wy(d),function(L,q){x.setRequestHeader(q,L)}),A.isUndefined(l.withCredentials)||(x.withCredentials=!!l.withCredentials),h&&h!=="json"&&(x.responseType=l.responseType),m&&([k,F]=za(m,!0),x.addEventListener("progress",k)),p&&x.upload&&([v,O]=za(p),x.upload.addEventListener("progress",v),x.upload.addEventListener("loadend",O)),(l.cancelToken||l.signal)&&(y=N=>{x&&(o(!N||N.type?new ii(null,r,x):N),x.abort(),S(),x=null)},l.cancelToken&&l.cancelToken.subscribe(y),l.signal&&(l.signal.aborted?y():l.signal.addEventListener("abort",y)));const D=CS(l.url);if(D&&!dt.protocols.includes(D)){o(new X("Unsupported protocol "+D+":",X.ERR_BAD_REQUEST,r)),S();return}x.send(u||null)})},$S=(r,t)=>{if(r=r?r.filter(Boolean):[],!t&&!r.length)return;const s=new AbortController;let o=!1;const l=function(p){if(!o){o=!0,d();const m=p instanceof Error?p:this.reason;s.abort(m instanceof X?m:new ii(m instanceof Error?m.message:m))}};let u=t&&setTimeout(()=>{u=null,l(new X(`timeout of ${t}ms exceeded`,X.ETIMEDOUT))},t);const d=()=>{r&&(u&&clearTimeout(u),u=null,r.forEach(p=>{p.unsubscribe?p.unsubscribe(l):p.removeEventListener("abort",l)}),r=null)};r.forEach(p=>p.addEventListener("abort",l,{once:!0}));const{signal:h}=s;return h.unsubscribe=()=>A.asap(d),h},VS=function*(r,t){let s=r.byteLength;if(s{const l=qS(r,t);let u=0,d,h=p=>{d||(d=!0,o&&o(p))};return new ReadableStream({async pull(p){try{const{done:m,value:y}=await l.next();if(m){h(),p.close();return}let v=y.byteLength;if(s){let k=u+=v;s(k)}p.enqueue(new Uint8Array(y))}catch(m){throw h(m),m}},cancel(p){return h(p),l.return()}},{highWaterMark:2})},Ba=r=>r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102,WS=(r,t,s)=>t+2O>=2&&o.charCodeAt(O-2)===37&&o.charCodeAt(O-1)===51&&(o.charCodeAt(O)===68||o.charCodeAt(O)===100);m>=0&&(o.charCodeAt(m)===61?(p++,m--):y(m)&&(p++,m-=3)),p===1&&m>=0&&(o.charCodeAt(m)===61||y(m))&&p++;const k=Math.floor(d/4)*3-(p||0);return k>0?k:0}let u=0;for(let d=0,h=o.length;d=55296&&p<=56319&&d+1=56320&&m<=57343?(u+=4,d++):u+=3}else u+=3}return u}const ad="1.18.1",im=64*1024,{isFunction:_a}=A,KS=r=>encodeURIComponent(r).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16))),am=r=>{if(!A.isString(r))return r;try{return decodeURIComponent(r)}catch{return r}},lm=(r,...t)=>{try{return!!r(...t)}catch{return!1}},GS=r=>{const t=r.indexOf("://");let s=r;return t!==-1&&(s=s.slice(t+3)),s.includes("@")||s.includes(":")},YS=r=>{const t=A.global!==void 0&&A.global!==null?A.global:globalThis,{ReadableStream:s,TextEncoder:o}=t;r=A.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},r);const{fetch:l,Request:u,Response:d}=r,h=l?_a(l):typeof fetch=="function",p=_a(u),m=_a(d);if(!h)return!1;const y=h&&_a(s),v=h&&(typeof o=="function"?(_=>D=>_.encode(D))(new o):async _=>new Uint8Array(await new u(_).arrayBuffer())),k=p&&y&&lm(()=>{let _=!1;const D=new u(dt.origin,{body:new s,method:"POST",get duplex(){return _=!0,"half"}}),N=D.headers.has("Content-Type");return D.body!=null&&D.body.cancel(),_&&!N}),O=m&&y&&lm(()=>A.isReadableStream(new d("").body)),F={stream:O&&(_=>_.body)};h&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!F[_]&&(F[_]=(D,N)=>{let L=D&&D[_];if(L)return L.call(D);throw new X(`Response type '${_}' is not supported`,X.ERR_NOT_SUPPORT,N)})});const S=async _=>{if(_==null)return 0;if(A.isBlob(_))return _.size;if(A.isSpecCompliantForm(_))return(await new u(dt.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(A.isArrayBufferView(_)||A.isArrayBuffer(_))return _.byteLength;if(A.isURLSearchParams(_)&&(_=_+""),A.isString(_))return(await v(_)).byteLength},x=async(_,D)=>{const N=A.toFiniteNumber(_.getContentLength());return N??S(D)};return async _=>{let{url:D,method:N,data:L,signal:q,cancelToken:$,timeout:G,onDownloadProgress:B,onUploadProgress:ie,responseType:ue,headers:Ee,withCredentials:Te="same-origin",fetchOptions:xe,maxContentLength:J,maxBodyLength:Se}=Ay(_);const _e=A.isNumber(J)&&J>-1,be=A.isNumber(Se)&&Se>-1,K=Y=>A.hasOwnProp(_,Y)?_[Y]:void 0;let ae=l||fetch;ue=ue?(ue+"").toLowerCase():"text";let U=$S([q,$&&$.toAbortSignal()],G),P=null;const z=U&&U.unsubscribe&&(()=>{U.unsubscribe()});let ce,me=null;const he=()=>new X("Request body larger than maxBodyLength limit",X.ERR_BAD_REQUEST,_,P);try{let Y;const ve=K("auth");if(ve){const we=A.getSafeProp(ve,"username")||"",it=A.getSafeProp(ve,"password")||"";Y={username:we,password:it}}if(GS(D)){const we=new URL(D,dt.origin);if(!Y&&(we.username||we.password)){const it=am(we.username),Xt=am(we.password);Y={username:it,password:Xt}}(we.username||we.password)&&(we.username="",we.password="",D=we.href)}if(Y&&(Ee.delete("authorization"),Ee.set("Authorization","Basic "+btoa(KS((Y.username||"")+":"+(Y.password||""))))),_e&&typeof D=="string"&&D.startsWith("data:")&&QS(D)>J)throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,_,P);if(be&&N!=="get"&&N!=="head"){const we=await S(L);if(typeof we=="number"&&isFinite(we)&&(ce=we,we>Se))throw he()}const Re=be&&(A.isReadableStream(L)||A.isStream(L)),ye=(we,it,Xt)=>om(we,im,Jt=>{if(be&&Jt>Se)throw me=he();it&&it(Jt)},Xt);if(k&&N!=="get"&&N!=="head"&&(ie||Re)){if(ce=ce??await x(Ee,L),ce!==0||Re){let we=new u(D,{method:"POST",body:L,duplex:"half"}),it;if(A.isFormData(L)&&(it=we.headers.get("content-type"))&&Ee.setContentType(it),we.body){const[Xt,Jt]=ie&&tm(ce,za(nm(ie)))||[];L=ye(we.body,Xt,Jt)}}}else if(Re&&!p&&y&&N!=="get"&&N!=="head")L=ye(L);else if(Re&&p&&!k&&N!=="get"&&N!=="head")throw new X("Stream request bodies are not supported by the current fetch implementation",X.ERR_NOT_SUPPORT,_,P);A.isString(Te)||(Te=Te?"include":"omit");const et=p&&"credentials"in u.prototype;if(A.isFormData(L)){const we=Ee.getContentType();we&&/^multipart\/form-data/i.test(we)&&!/boundary=/i.test(we)&&Ee.delete("content-type")}Ee.set("User-Agent","axios/"+ad,!1);const Mt={...xe,signal:U,method:N.toUpperCase(),headers:wy(Ee.normalize()),body:L,duplex:"half",credentials:et?Te:void 0};P=p&&new u(D,Mt);let ot=await(p?ae(P,xe):ae(D,Mt));const Yt=vt.from(ot.headers);if(_e){const we=A.toFiniteNumber(Yt.getContentLength());if(we!=null&&we>J)throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,_,P)}const Ft=O&&(ue==="stream"||ue==="response");if(O&&ot.body&&(B||_e||Ft&&z)){const we={};["status","statusText","headers"].forEach(Sn=>{we[Sn]=ot[Sn]});const it=A.toFiniteNumber(Yt.getContentLength()),[Xt,Jt]=B&&tm(it,za(nm(B),!0))||[];let Mn=0;const Fn=Sn=>{if(_e&&(Mn=Sn,Mn>J))throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,_,P);Xt&&Xt(Sn)};ot=new d(om(ot.body,im,Fn,()=>{Jt&&Jt(),z&&z()}),we)}ue=ue||"text";let Ut=await F[A.findKey(F,ue)||"text"](ot,_);if(_e&&!O&&!Ft){let we;if(Ut!=null&&(typeof Ut.byteLength=="number"?we=Ut.byteLength:typeof Ut.size=="number"?we=Ut.size:typeof Ut=="string"&&(we=typeof o=="function"?new o().encode(Ut).byteLength:Ut.length)),typeof we=="number"&&we>J)throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,_,P)}return!Ft&&z&&z(),await new Promise((we,it)=>{Ty(we,it,{data:Ut,headers:vt.from(ot.headers),status:ot.status,statusText:ot.statusText,config:_,request:P})})}catch(Y){if(z&&z(),U&&U.aborted&&U.reason instanceof X){const ve=U.reason;throw ve.config=_,P&&(ve.request=P),Y!==ve&&Object.defineProperty(ve,"cause",{__proto__:null,value:Y,writable:!0,enumerable:!1,configurable:!0}),ve}if(me)throw P&&!me.request&&(me.request=P),me;if(Y instanceof X)throw P&&!Y.request&&(Y.request=P),Y;if(Y&&Y.name==="TypeError"&&/Load failed|fetch/i.test(Y.message)){const ve=new X("Network Error",X.ERR_NETWORK,_,P,Y&&Y.response);throw Object.defineProperty(ve,"cause",{__proto__:null,value:Y.cause||Y,writable:!0,enumerable:!1,configurable:!0}),ve}throw X.from(Y,Y&&Y.code,_,P,Y&&Y.response)}}},XS=new Map,Ny=r=>{let t=r&&r.env||{};const{fetch:s,Request:o,Response:l}=t,u=[o,l,s];let d=u.length,h=d,p,m,y=XS;for(;h--;)p=u[h],m=y.get(p),m===void 0&&y.set(p,m=h?new Map:YS(t)),y=m;return m};Ny();const ld={http:cS,xhr:BS,fetch:{get:Ny}};A.forEach(ld,(r,t)=>{if(r){try{Object.defineProperty(r,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(r,"adapterName",{__proto__:null,value:t})}});const um=r=>`- ${r}`,JS=r=>A.isFunction(r)||r===null||r===!1;function ZS(r,t){r=A.isArray(r)?r:[r];const{length:s}=r;let o,l;const u={};for(let d=0;d`adapter ${p} `+(m===!1?"is not supported by the environment":"is not available in the build"));let h=s?d.length>1?`since : `+d.map(um).join(` `):" "+um(d[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+h,X.ERR_NOT_SUPPORT)}return l}const Oy={getAdapter:ZS,adapters:ld};function Ju(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new ii(null,r)}function cm(r){return Ju(r),r.headers=vt.from(r.headers),r.data=Xu.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Oy.getAdapter(r.adapter||oi.adapter,r)(r).then(function(o){Ju(r),r.response=o;try{o.data=Xu.call(r,r.transformResponse,o)}finally{delete r.response}return o.headers=vt.from(o.headers),o},function(o){if(!Ry(o)&&(Ju(r),o&&o.response)){r.response=o.response;try{o.response.data=Xu.call(r,r.transformResponse,o.response)}finally{delete r.response}o.response.headers=vt.from(o.response.headers)}return Promise.reject(o)})}const Qa={};["object","boolean","number","function","string","symbol"].forEach((r,t)=>{Qa[r]=function(o){return typeof o===r||"a"+(t<1?"n ":" ")+r}});const dm={};Qa.transitional=function(t,s,o){function l(u,d){return"[Axios v"+ad+"] Transitional option '"+u+"'"+d+(o?". "+o:"")}return(u,d,h)=>{if(t===!1)throw new X(l(d," has been removed"+(s?" in "+s:"")),X.ERR_DEPRECATED);return s&&!dm[d]&&(dm[d]=!0,console.warn(l(d," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(u,d,h):!0}};Qa.spelling=function(t){return(s,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function eb(r,t,s){if(typeof r!="object"||r===null)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const o=Object.keys(r);let l=o.length;for(;l-- >0;){const u=o[l],d=Object.prototype.hasOwnProperty.call(t,u)?t[u]:void 0;if(d){const h=r[u],p=h===void 0||d(h,u,r);if(p!==!0)throw new X("option "+u+" must be "+p,X.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new X("Unknown option "+u,X.ERR_BAD_OPTION)}}const Aa={assertOptions:eb,validators:Qa},gt=Aa.validators;let Qr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Zp,response:new Zp}}async request(t,s){try{return await this._request(t,s)}catch(o){if(o instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const u=(()=>{if(!l.stack)return"";const d=l.stack.indexOf(` `);return d===-1?"":l.stack.slice(d+1)})();try{if(!o.stack)o.stack=u;else if(u){const d=u.indexOf(` `),h=d===-1?-1:u.indexOf(` `,d+1),p=h===-1?"":u.slice(h+1);String(o.stack).endsWith(p)||(o.stack+=` `+u)}}catch{}}throw o}}_request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=Zr(this.defaults,s);const{transitional:o,paramsSerializer:l,headers:u}=s;o!==void 0&&Aa.assertOptions(o,{silentJSONParsing:gt.transitional(gt.boolean),forcedJSONParsing:gt.transitional(gt.boolean),clarifyTimeoutError:gt.transitional(gt.boolean),legacyInterceptorReqResOrdering:gt.transitional(gt.boolean),advertiseZstdAcceptEncoding:gt.transitional(gt.boolean),validateStatusUndefinedResolves:gt.transitional(gt.boolean)},!1),l!=null&&(A.isFunction(l)?s.paramsSerializer={serialize:l}:Aa.assertOptions(l,{encode:gt.function,serialize:gt.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),Aa.assertOptions(s,{baseUrl:gt.spelling("baseURL"),withXsrfToken:gt.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let d=u&&A.merge(u.common,u[s.method]);u&&A.forEach(["delete","get","head","post","put","patch","query","common"],F=>{delete u[F]}),s.headers=vt.concat(d,u);const h=[];let p=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(s)===!1)return;p=p&&S.synchronous;const x=s.transitional||od;x&&x.legacyInterceptorReqResOrdering?h.unshift(S.fulfilled,S.rejected):h.push(S.fulfilled,S.rejected)});const m=[];this.interceptors.response.forEach(function(S){m.push(S.fulfilled,S.rejected)});let y,v=0,k;if(!p){const F=[cm.bind(this),void 0];for(F.unshift(...h),F.push(...m),k=F.length,y=Promise.resolve(s);v{if(!o._listeners)return;let u=o._listeners.length;for(;u-- >0;)o._listeners[u](l);o._listeners=null}),this.promise.then=l=>{let u;const d=new Promise(h=>{o.subscribe(h),u=h}).then(l);return d.cancel=function(){o.unsubscribe(u)},d},t(function(u,d,h){o.reason||(o.reason=new ii(u,d,h),s(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const t=new AbortController,s=o=>{t.abort(o)};return this.subscribe(s),t.signal.unsubscribe=()=>this.unsubscribe(s),t.signal}static source(){let t;return{token:new Ly(function(l){t=l}),cancel:t}}};function nb(r){return function(s){return r.apply(null,s)}}function rb(r){return A.isObject(r)&&r.isAxiosError===!0}const Oc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Oc).forEach(([r,t])=>{Oc[t]=r});function Dy(r){const t=new Qr(r),s=cy(Qr.prototype.request,t);return A.extend(s,Qr.prototype,t,{allOwnKeys:!0}),A.extend(s,t,null,{allOwnKeys:!0}),s.create=function(l){return Dy(Zr(r,l))},s}const Ke=Dy(oi);Ke.Axios=Qr;Ke.CanceledError=ii;Ke.CancelToken=tb;Ke.isCancel=Ry;Ke.VERSION=ad;Ke.toFormData=Wa;Ke.AxiosError=X;Ke.Cancel=Ke.CanceledError;Ke.all=function(t){return Promise.all(t)};Ke.spread=nb;Ke.isAxiosError=rb;Ke.mergeConfig=Zr;Ke.AxiosHeaders=vt;Ke.formToJSON=r=>Cy(A.isHTMLForm(r)?new FormData(r):r);Ke.getAdapter=Oy.getAdapter;Ke.HttpStatusCode=Oc;Ke.default=Ke;const{Axios:RC,AxiosError:TC,CanceledError:PC,isCancel:AC,CancelToken:NC,VERSION:OC,all:LC,Cancel:DC,isAxiosError:jC,spread:IC,toFormData:MC,AxiosHeaders:FC,HttpStatusCode:UC,formToJSON:zC,getAdapter:BC,mergeConfig:$C,create:VC}=Ke,jy=typeof window>"u",fm=!jy&&window.self!==window.top,sb=!jy&&typeof document>"u",Zu=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),ut=[];for(let r=0;r<256;++r)ut.push((r+256).toString(16).slice(1));function ob(r,t=0){return(ut[r[t+0]]+ut[r[t+1]]+ut[r[t+2]]+ut[r[t+3]]+"-"+ut[r[t+4]]+ut[r[t+5]]+"-"+ut[r[t+6]]+ut[r[t+7]]+"-"+ut[r[t+8]]+ut[r[t+9]]+"-"+ut[r[t+10]]+ut[r[t+11]]+ut[r[t+12]]+ut[r[t+13]]+ut[r[t+14]]+ut[r[t+15]]).toLowerCase()}let ec;const ib=new Uint8Array(16);function ab(){if(!ec){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ec=crypto.getRandomValues.bind(crypto)}return ec(ib)}const lb=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),hm={randomUUID:lb};function ub(r,t,s){var l;r=r||{};const o=r.random??((l=r.rng)==null?void 0:l.call(r))??ab();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,ob(o)}function cb(r,t,s){return hm.randomUUID&&!r?hm.randomUUID():ub(r)}const jo=typeof window<"u"?window:{base44SharedInstances:{}};function db(r,t){return jo.base44SharedInstances||(jo.base44SharedInstances={}),jo.base44SharedInstances[r]||(jo.base44SharedInstances[r]={instance:t()}),jo.base44SharedInstances[r].instance}const fb="__user_heartbeat_event__",hb="__initialization_event__",pb="__session_duration_event__",pm="analytics-enable",mm="base44_analytics_session_id",mb={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},gb="analytics",Me=db(gb,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...mb,...bb()}})),yb=({axiosClient:r,serverUrl:t,appId:s,userAuthModule:o})=>{var l;const{maxQueueSize:u,throttleTime:d,batchSize:h}=Me.config;if(!(!((l=Me.config)===null||l===void 0)&&l.enabled)||sb)return{track:()=>{},cleanup:()=>{}};let p;const m=`${t}/api/apps/${s}/analytics/track/batch`,y=async N=>{await r.request({method:"POST",url:`/apps/${s}/analytics/track/batch`,data:{events:N}})},v=N=>{try{const L=JSON.stringify({events:N}),q=new Blob([L],{type:"application/json"});return typeof navigator>"u"||L.length>6e4||!navigator.sendBeacon(m,q)}catch{return!1}},k=async(N,L={})=>{if(N.length===0)return;const q=await Sb(o),$=N.map(_b(q));try{(!L.isBeacon||!v($))&&await y($)}catch{}},O=()=>{ym(k,{throttleTime:d,batchSize:h})},F=N=>{if(Me.requestsQueue.length>=u)return;const L=Eb();Me.requestsQueue.push({...N,...L}),O()},S=()=>{ym(k,{throttleTime:d,batchSize:h}),p=vm(F),wb()},x=()=>{gm(),p==null||p(),xb(F);const N=Me.requestsQueue.splice(0);k(N,{isBeacon:!0})},_=()=>{typeof window>"u"||(document.visibilityState==="hidden"?x():document.visibilityState==="visible"&&S())},D=()=>{gm(),p==null||p(),typeof window<"u"&&window.removeEventListener("visibilitychange",_)};return O(),p=vm(F),vb(F),typeof window<"u"&&window.addEventListener("visibilitychange",_),{track:F,cleanup:D}};function gm(){Me.isProcessing=!1}async function ym(r,t){if(Me.isProcessing)return;Me.isProcessing=!0;const{throttleTime:s=1e3,batchSize:o=30}=t??{};for(;Me.isProcessing&&Me.requestsQueue.length>0;){const l=Me.requestsQueue.splice(0,o);l.length&&await r(l),await new Promise(u=>setTimeout(u,s))}Me.isProcessing=!1}function vm(r){var t;if(Me.isHeartBeatProcessing||((t=Me.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Me.isHeartBeatProcessing=!0;const s=setInterval(()=>{r({eventName:fb})},Me.config.heartBeatInterval);return()=>{clearInterval(s),Me.isHeartBeatProcessing=!1}}function vb(r){typeof window>"u"||Me.wasInitializationTracked||(Me.wasInitializationTracked=!0,r({eventName:hb,properties:{referrer:document==null?void 0:document.referrer}}))}function wb(){typeof window>"u"||Me.sessionStartTime!==null||(Me.sessionStartTime=new Date().toISOString())}function xb(r){if(typeof window>"u"||Me.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Me.sessionStartTime).getTime();Me.sessionStartTime=null,r({eventName:pb,properties:{sessionDuration:t}})}function Eb(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function _b(r){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...r})}let tc=null;async function Sb(r){if(!Me.sessionContext){if(!tc){const t=ud();tc=r.me().then(s=>({user_id:s.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}Me.sessionContext=await tc}return Me.sessionContext}function bb(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(pm);if(t==null||!t.length)return;const s=new URLSearchParams(window.location.search);s.delete(pm);const o=window.location.pathname+(s.toString()?"?"+s.toString():"");return window.history.replaceState({},"",o),{enabled:t==="true"}}function ud(){if(typeof window>"u")return Zu();try{const r=localStorage.getItem(mm);if(!r){const t=Zu();return localStorage.setItem(mm,t),t}return r}catch{return Zu()}}class kb extends Error{constructor(t,s,o,l,u){super(t),this.name="Base44Error",this.status=s,this.code=o,this.data=l,this.originalError=u}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Uo({baseURL:r,headers:t={},token:s,interceptResponses:o=!0,onError:l}){const u=Ke.create({baseURL:r,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return s&&(u.defaults.headers.common.Authorization=`Bearer ${s}`),u.interceptors.request.use(d=>{typeof window<"u"&&window.location&&(d.headers.set("X-Origin-URL",window.location.href),d.headers.get("Authorization")||d.headers.set("X-Base44-Anonymous-Id",ud()));const h=cb();if(d.requestId=h,fm)try{window.parent.postMessage({type:"api-request-start",requestId:h,data:{url:r+d.url,method:d.method,body:d.data instanceof FormData?"[FormData object]":d.data}},"*")}catch{}return d}),o&&u.interceptors.response.use(d=>{var h;const p=(h=d.config)===null||h===void 0?void 0:h.requestId;try{fm&&p&&window.parent.postMessage({type:"api-request-end",requestId:p,data:{statusCode:d.status,response:d.data}},"*")}catch{}return d.data},d=>{var h,p,m,y,v,k,O,F;const S=((p=(h=d.response)===null||h===void 0?void 0:h.data)===null||p===void 0?void 0:p.message)||((y=(m=d.response)===null||m===void 0?void 0:m.data)===null||y===void 0?void 0:y.detail)||d.message,x=new kb(S,(v=d.response)===null||v===void 0?void 0:v.status,(O=(k=d.response)===null||k===void 0?void 0:k.data)===null||O===void 0?void 0:O.code,(F=d.response)===null||F===void 0?void 0:F.data,d);return l==null||l(x),Promise.reject(x)}),u}function wm(r){const{axios:t,appId:s,getSocket:o}=r;return new Proxy({},{get(l,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return Rb(t,s,u,o)}})}function Cb(r){var t;try{const s=JSON.parse(r);return{type:s.type,data:s.data,id:s.id||((t=s.data)===null||t===void 0?void 0:t.id),timestamp:s.timestamp||new Date().toISOString()}}catch(s){return console.warn("[Base44 SDK] Failed to parse realtime message:",s),null}}function Rb(r,t,s,o){const l=`/apps/${t}/entities/${s}`;return{async list(u,d,h,p){const m={};return u&&(m.sort=u),d&&(m.limit=d),h&&(m.skip=h),p&&(m.fields=Array.isArray(p)?p.join(","):p),r.get(l,{params:m})},async filter(u,d,h,p,m){const y={q:JSON.stringify(u)};return d&&(y.sort=d),h&&(y.limit=h),p&&(y.skip=p),m&&(y.fields=Array.isArray(m)?m.join(","):m),r.get(l,{params:y})},async get(u){return r.get(`${l}/${u}`)},async create(u){return r.post(l,u)},async update(u,d){return r.put(`${l}/${u}`,d)},async delete(u){return r.delete(`${l}/${u}`)},async deleteMany(u){return r.delete(l,{data:u})},async bulkCreate(u){return r.post(`${l}/bulk`,u)},async updateMany(u,d){return r.patch(`${l}/update-many`,{query:u,data:d})},async bulkUpdate(u){return r.put(`${l}/bulk`,u)},async importEntities(u){const d=new FormData;return d.append("file",u,u.name),r.post(`${l}/import`,d,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(u){const d=`entities:${t}:${s}`;return o().subscribeToRoom(d,{update_model:m=>{var y;const v=Cb(m.data);if(v){v.type!=="delete"&&(!((y=v.data)===null||y===void 0)&&y._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${s}#${v.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${s}.get("${v.id}")\` to fetch the full record.`);try{u(v)}catch(k){console.error("[Base44 SDK] Subscription callback error:",k)}}}})}}}function Tb(r,t){return{async call(s,o,l){if(!(s!=null&&s.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(o!=null&&o.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:u,queryParams:d,...h}=l??{},p={...h,...u&&{path_params:u},...d&&{query_params:d}};return await r.post(`/apps/${t}/integrations/custom/${s}/${o}`,p)}}}function xm(r,t){const s=Tb(r,t);return new Proxy({},{get(o,l){if(!(typeof l!="string"||l==="then"||l.startsWith("_")))return l==="custom"?s:new Proxy({},{get(u,d){if(!(typeof d!="string"||d==="then"||d.startsWith("_")))return async h=>{if(typeof h=="string")throw new Error(`Integration ${d} must receive an object with named parameters, received: ${h}`);let p,m;return h instanceof FormData||h&&Object.values(h).some(y=>y instanceof File)?(p=new FormData,Object.keys(h).forEach(y=>{h[y]instanceof File?p.append(y,h[y],h[y].name):typeof h[y]=="object"&&h[y]!==null?p.append(y,JSON.stringify(h[y])):p.append(y,h[y])}),m="multipart/form-data"):(p=h,m="application/json"),l==="Core"?r.post(`/apps/${t}/integration-endpoints/Core/${d}`,p||h,{headers:{"Content-Type":m}}):r.post(`/apps/${t}/integration-endpoints/installable/${l}/integration-endpoints/${d}`,p||h,{headers:{"Content-Type":m}})}}})}})}function Pb(){return typeof window>"u"?!1:window!==window.parent}function Ab(r,t,s){const u=Math.round(window.screenX+(window.outerWidth-500)/2),d=Math.round(window.screenY+(window.outerHeight-600)/2),h=window.open(r,"base44_auth",`width=500,height=600,left=${u},top=${d},resizable=yes,scrollbars=yes`);if(!h)return;const p=()=>{window.removeEventListener("message",m),clearInterval(y),h.closed||h.close()},m=v=>{var k;if(v.origin!==s||v.source!==h||!(!((k=v.data)===null||k===void 0)&&k.access_token))return;p();const O=new URL(t),{access_token:F,is_new_user:S}=v.data;O.searchParams.set("access_token",F),S!=null&&O.searchParams.set("is_new_user",String(S)),window.location.href=O.toString()},y=setInterval(()=>{h.closed&&p()},500);window.addEventListener("message",m)}function Nb(r,t,s,o){return{async me(){return r.get(`/apps/${s}/entities/User/me`)},async updateMe(l){return r.put(`/apps/${s}/entities/User/me`,l)},redirectToLogin(l){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const u=l?new URL(l,window.location.origin).toString():window.location.href,d=`${o.appBaseUrl}/login?from_url=${encodeURIComponent(u)}`;window.location.href=d},loginWithProvider(l,u="/"){const d=new URL(u,window.location.origin).toString(),h=`app_id=${s}&from_url=${encodeURIComponent(d)}`;let p;l==="sso"?p=`/apps/${s}/auth/sso/login`:p=`/apps/auth${l==="google"?"":`/${l}`}/login`;const m=`${o.appBaseUrl}/api${p}?${h}`;if(Pb()){const y=`${m}&popup_origin=${encodeURIComponent(window.location.origin)}`;return Ab(y,d,window.location.origin)}window.location.href=m},logout(l){if(delete r.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(h){console.error("Failed to remove token from localStorage:",h)}const u=l||window.location.href,d=`${o.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(u)}`;window.location.href=d}},setToken(l,u=!0){if(l&&(r.defaults.headers.common.Authorization=`Bearer ${l}`,t.defaults.headers.common.Authorization=`Bearer ${l}`,u&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",l),window.localStorage.setItem("token",l)}catch(d){console.error("Failed to save token to localStorage:",d)}},async loginViaEmailPassword(l,u,d){var h;try{const p=await r.post(`/apps/${s}/auth/login`,{email:l,password:u,...d&&{turnstile_token:d}}),{access_token:m,user:y}=p;return m&&this.setToken(m),{access_token:m,user:y}}catch(p){throw((h=p.response)===null||h===void 0?void 0:h.status)===401&&await this.logout(),p}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(l,u){return r.post(`/apps/${s}/users/invite-user`,{user_email:l,role:u})},register(l){return r.post(`/apps/${s}/auth/register`,l)},verifyOtp({email:l,otpCode:u}){return r.post(`/apps/${s}/auth/verify-otp`,{email:l,otp_code:u})},resendOtp(l){return r.post(`/apps/${s}/auth/resend-otp`,{email:l})},resetPasswordRequest(l){return r.post(`/apps/${s}/auth/reset-password-request`,{email:l})},resetPassword({resetToken:l,newPassword:u}){return r.post(`/apps/${s}/auth/reset-password`,{reset_token:l,new_password:u})},changePassword({userId:l,currentPassword:u,newPassword:d}){return r.post(`/apps/${s}/auth/change-password`,{user_id:l,current_password:u,new_password:d})}}}function Ob(r,t){return{async getAccessToken(s){const o=`/apps/${t}/auth/sso/accesstoken/${s}`;return r.get(o)},async getIdToken(s){const o=`/apps/${t}/auth/sso/idtoken/${s}`;return r.get(o)}}}function Lb(r,t){return{async getAccessToken(s){if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");return(await r.get(`/apps/${t}/external-auth/tokens/${s}`)).access_token},async getConnection(s){var o;if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");const u=await r.get(`/apps/${t}/external-auth/tokens/${s}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getWorkspaceConnection(s){var o;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await r.get(`/apps/${t}/external-auth/tokens/connectors/${s}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getCurrentAppUserAccessToken(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await r.get(`/apps/${t}/app-user-auth/connectors/${s}/token`)).access_token},async getCurrentAppUserConnection(s){var o;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await r.get(`/apps/${t}/app-user-auth/connectors/${s}/token`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}}}}function Db(r,t){return{async connectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await r.post(`/apps/${t}/app-user-auth/connectors/${s}/initiate`)).redirect_url},async disconnectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");await r.delete(`/apps/${t}/app-user-auth/connectors/${s}`)}}}function Kr(r={}){const{storageKey:t="base44_access_token",paramName:s="access_token",saveToStorage:o=!0,removeFromUrl:l=!0}=r;let u=null;if(typeof window<"u"&&window.location)try{const d=new URLSearchParams(window.location.search);if(u=d.get(s),u){if(o&&jb(u,{storageKey:t}),l){d.delete(s);const h=`${window.location.pathname}${d.toString()?`?${d.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}return u}}catch(d){console.error("Error retrieving token from URL:",d)}if(typeof window<"u"&&window.localStorage)try{return u=window.localStorage.getItem(t),u}catch(d){console.error("Error retrieving token from local storage:",d)}return null}function jb(r,t){const{storageKey:s="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!r)return!1;try{return window.localStorage.setItem(s,r),window.localStorage.setItem("token",r),!0}catch(o){return console.error("Error saving token to local storage:",o),!1}}function Em(r,t,s){const o=(u,d)=>u?`${String(u).replace(/\/$/,"")}${d}`:d,l=u=>{const d=new Headers;if(s!=null&&s.getAuthHeaders){const h=s.getAuthHeaders();Object.entries(h).forEach(([p,m])=>{m!=null&&d.set(p,String(m))})}return u&&new Headers(u).forEach((h,p)=>{d.set(p,h)}),d};return{async invoke(u,d){if(typeof d=="string")throw new Error(`Function ${u} must receive an object with named parameters, received: ${d}`);let h,p;return d instanceof FormData||d&&Object.values(d).some(m=>m instanceof File)?(h=new FormData,Object.keys(d).forEach(m=>{d[m]instanceof File?h.append(m,d[m],d[m].name):typeof d[m]=="object"&&d[m]!==null?h.append(m,JSON.stringify(d[m])):h.append(m,d[m])}),p="multipart/form-data"):(h=d,p="application/json"),r.post(`/apps/${t}/functions/${u}`,h||d,{headers:{"Content-Type":p}})},async fetch(u,d={}){const p=`/functions${u.startsWith("/")?u:`/${u}`}`,m=l(d.headers),y={...d,headers:m};return await fetch(o(s==null?void 0:s.baseURL,p),y)}}}function _m({axios:r,getSocket:t,appId:s,serverUrl:o,token:l}){const u=`/apps/${s}/agents`,d={},h=()=>r.get(`${u}/conversations`),p=S=>r.get(`${u}/conversations/${S}`);return{getConversations:h,getConversation:p,listConversations:S=>r.get(`${u}/conversations`,{params:S}),createConversation:S=>r.post(`${u}/conversations`,S),addMessage:async(S,x)=>r.post(`${u}/conversations/v2/${S.id}/messages`,x),subscribeToConversation:(S,x)=>{const _=`/agent-conversations/${S}`,D=t(),N=p(S).then(L=>(d[S]=L,L));return D.subscribeToRoom(_,{connect:()=>{},update_model:async({data:L})=>{const q=JSON.parse(L);if(q._message){await N;const $=q._message,G=d[S];if(G){const B=G.messages||[],ie=B.findIndex(Ee=>Ee.id===$.id),ue=ie!==-1?B.map((Ee,Te)=>Te===ie?$:Ee):[...B,$];d[S]={...G,messages:ue},x==null||x(d[S])}}}})},getWhatsAppConnectURL:S=>{const x=`${o}/api/apps/${s}/agents/${encodeURIComponent(S)}/whatsapp`,_=l??Kr();return _?`${x}?token=${_}`:x},getTelegramConnectURL:S=>{const x=`${o}/api/apps/${s}/agents/${encodeURIComponent(S)}/telegram`,_=l??Kr();return _?`${x}?token=${_}`:x}}}function Sm({serverUrl:r,token:t,appId:s}){return{connection:()=>{var l;return{baseURL:`${r}/api/apps/${s}/ai/openai/v1`,token:(l=t??Kr())!==null&&l!==void 0?l:""}}}}function bm(r,t){const s=`/app-logs/${t}`;return{async logUserInApp(o){await r.post(`${s}/log-user-in-app/${o}`)},async fetchLogs(o={}){return await r.get(s,{params:o})},async getStats(o={}){return await r.get(`${s}/stats`,{params:o})}}}function Ib(r,t){return{async inviteUser(s,o){if(o!=="user"&&o!=="admin")throw new Error(`Invalid role: "${o}". Role must be either "user" or "admin".`);return await r.post(`/apps/${t}/runtime/users/invite-user`,{user_email:s,role:o})}}}const En=Object.create(null);En.open="0";En.close="1";En.ping="2";En.pong="3";En.message="4";En.upgrade="5";En.noop="6";const Na=Object.create(null);Object.keys(En).forEach(r=>{Na[En[r]]=r});const Lc={type:"error",data:"parser error"},Iy=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",My=typeof ArrayBuffer=="function",Fy=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,cd=({type:r,data:t},s,o)=>Iy&&t instanceof Blob?s?o(t):km(t,o):My&&(t instanceof ArrayBuffer||Fy(t))?s?o(t):km(new Blob([t]),o):o(En[r]+(t||"")),km=(r,t)=>{const s=new FileReader;return s.onload=function(){const o=s.result.split(",")[1];t("b"+(o||""))},s.readAsDataURL(r)};function Cm(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}let nc;function Mb(r,t){if(Iy&&r.data instanceof Blob)return r.data.arrayBuffer().then(Cm).then(t);if(My&&(r.data instanceof ArrayBuffer||Fy(r.data)))return t(Cm(r.data));cd(r,!1,s=>{nc||(nc=new TextEncoder),t(nc.encode(s))})}const Rm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r{let t=r.length*.75,s=r.length,o,l=0,u,d,h,p;r[r.length-1]==="="&&(t--,r[r.length-2]==="="&&t--);const m=new ArrayBuffer(t),y=new Uint8Array(m);for(o=0;o>4,y[l++]=(d&15)<<4|h>>2,y[l++]=(h&3)<<6|p&63;return m},Ub=typeof ArrayBuffer=="function",dd=(r,t)=>{if(typeof r!="string")return{type:"message",data:Uy(r,t)};const s=r.charAt(0);return s==="b"?{type:"message",data:zb(r.substring(1),t)}:Na[s]?r.length>1?{type:Na[s],data:r.substring(1)}:{type:Na[s]}:Lc},zb=(r,t)=>{if(Ub){const s=Fb(r);return Uy(s,t)}else return{base64:!0,data:r}},Uy=(r,t)=>{switch(t){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}},zy="",Bb=(r,t)=>{const s=r.length,o=new Array(s);let l=0;r.forEach((u,d)=>{cd(u,!1,h=>{o[d]=h,++l===s&&t(o.join(zy))})})},$b=(r,t)=>{const s=r.split(zy),o=[];for(let l=0;l{const o=s.length;let l;if(o<126)l=new Uint8Array(1),new DataView(l.buffer).setUint8(0,o);else if(o<65536){l=new Uint8Array(3);const u=new DataView(l.buffer);u.setUint8(0,126),u.setUint16(1,o)}else{l=new Uint8Array(9);const u=new DataView(l.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(o))}r.data&&typeof r.data!="string"&&(l[0]|=128),t.enqueue(l),t.enqueue(s)})}})}let rc;function Sa(r){return r.reduce((t,s)=>t+s.length,0)}function ba(r,t){if(r[0].length===t)return r.shift();const s=new Uint8Array(t);let o=0;for(let l=0;lMath.pow(2,21)-1){h.enqueue(Lc);break}l=y*Math.pow(2,32)+m.getUint32(4),o=3}else{if(Sa(s)r){h.enqueue(Lc);break}}}})}const By=4;function Ye(r){if(r)return Hb(r)}function Hb(r){for(var t in Ye.prototype)r[t]=Ye.prototype[t];return r}Ye.prototype.on=Ye.prototype.addEventListener=function(r,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(t),this};Ye.prototype.once=function(r,t){function s(){this.off(r,s),t.apply(this,arguments)}return s.fn=t,this.on(r,s),this};Ye.prototype.off=Ye.prototype.removeListener=Ye.prototype.removeAllListeners=Ye.prototype.removeEventListener=function(r,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+r];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var o,l=0;lPromise.resolve().then(t):(t,s)=>s(t,0),Kt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Wb="arraybuffer";function $y(r,...t){return t.reduce((s,o)=>(r.hasOwnProperty(o)&&(s[o]=r[o]),s),{})}const Qb=Kt.setTimeout,Kb=Kt.clearTimeout;function Ga(r,t){t.useNativeTimers?(r.setTimeoutFn=Qb.bind(Kt),r.clearTimeoutFn=Kb.bind(Kt)):(r.setTimeoutFn=Kt.setTimeout.bind(Kt),r.clearTimeoutFn=Kt.clearTimeout.bind(Kt))}const Gb=1.33;function Yb(r){return typeof r=="string"?Xb(r):Math.ceil((r.byteLength||r.size)*Gb)}function Xb(r){let t=0,s=0;for(let o=0,l=r.length;o=57344?s+=3:(o++,s+=4);return s}function Vy(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Jb(r){let t="";for(let s in r)r.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(r[s]));return t}function Zb(r){let t={},s=r.split("&");for(let o=0,l=s.length;o{this.readyState="paused",t()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||s()})),this.writable||(o++,this.once("drain",function(){--o||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const s=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};$b(t,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Bb(t,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=Vy()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(t,s)}}let qy=!1;try{qy=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const nk=qy;function rk(){}class sk extends tk{constructor(t){if(super(t),typeof location<"u"){const s=location.protocol==="https:";let o=location.port;o||(o=s?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||o!==t.port}}doWrite(t,s){const o=this.request({method:"POST",data:t});o.on("success",s),o.on("error",(l,u)=>{this.onError("xhr post error",l,u)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(s,o)=>{this.onError("xhr poll error",s,o)}),this.pollXhr=t}}class xn extends Ye{constructor(t,s,o){super(),this.createRequest=t,Ga(this,o),this._opts=o,this._method=o.method||"GET",this._uri=s,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var t;const s=$y(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(s);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let l in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(l)&&o.setRequestHeader(l,this._opts.extraHeaders[l])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var l;o.readyState===3&&((l=this._opts.cookieJar)===null||l===void 0||l.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(l){this.setTimeoutFn(()=>{this._onError(l)},0);return}typeof document<"u"&&(this._index=xn.requestsCount++,xn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=rk,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete xn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}xn.requestsCount=0;xn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Tm);else if(typeof addEventListener=="function"){const r="onpagehide"in Kt?"pagehide":"unload";addEventListener(r,Tm,!1)}}function Tm(){for(let r in xn.requests)xn.requests.hasOwnProperty(r)&&xn.requests[r].abort()}const ok=(function(){const r=Hy({xdomain:!1});return r&&r.responseType!==null})();class ik extends sk{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=ok&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new xn(Hy,this.uri(),t)}}function Hy(r){const t=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||nk))return new XMLHttpRequest}catch{}if(!t)try{return new Kt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Wy=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ak extends fd{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,o=Wy?{}:$y(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,o)}catch(l){return this.emitReserved("error",l)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s{try{this.doWrite(o,u)}catch{}l&&Ka(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=Vy()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const sc=Kt.WebSocket||Kt.MozWebSocket;class lk extends ak{createSocket(t,s,o){return Wy?new sc(t,s,o):s?new sc(t,s):new sc(t)}doWrite(t,s){this.ws.send(s)}}class uk extends fd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const s=qb(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=t.readable.pipeThrough(s).getReader(),l=Vb();l.readable.pipeTo(t.writable),this._writer=l.writable.getWriter();const u=()=>{o.read().then(({done:h,value:p})=>{h||(this.onPacket(p),u())}).catch(h=>{})};u();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let s=0;s{l&&Ka(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const ck={websocket:lk,webtransport:uk,polling:ik},dk=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,fk=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Dc(r){if(r.length>8e3)throw"URI too long";const t=r,s=r.indexOf("["),o=r.indexOf("]");s!=-1&&o!=-1&&(r=r.substring(0,s)+r.substring(s,o).replace(/:/g,";")+r.substring(o,r.length));let l=dk.exec(r||""),u={},d=14;for(;d--;)u[fk[d]]=l[d]||"";return s!=-1&&o!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=hk(u,u.path),u.queryKey=pk(u,u.query),u}function hk(r,t){const s=/\/{2,9}/g,o=t.replace(s,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&o.splice(0,1),t.slice(-1)=="/"&&o.splice(o.length-1,1),o}function pk(r,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,l,u){l&&(s[l]=u)}),s}const jc=typeof addEventListener=="function"&&typeof removeEventListener=="function",Oa=[];jc&&addEventListener("offline",()=>{Oa.forEach(r=>r())},!1);class vr extends Ye{constructor(t,s){if(super(),this.binaryType=Wb,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){const o=Dc(t);s.hostname=o.host,s.secure=o.protocol==="https"||o.protocol==="wss",s.port=o.port,o.query&&(s.query=o.query)}else s.host&&(s.hostname=Dc(s.host).host);Ga(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(o=>{const l=o.prototype.name;this.transports.push(l),this._transportsByName[l]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Zb(this.opts.query)),jc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Oa.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=By,s.transport=t,this.id&&(s.sid=this.id);const o=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&vr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",vr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let o=0;o0&&s>this._maxPayload)return this.writeBuffer.slice(0,o);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Ka(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,o){return this._sendPacket("message",t,s,o),this}send(t,s,o){return this._sendPacket("message",t,s,o),this}_sendPacket(t,s,o,l){if(typeof s=="function"&&(l=s,s=void 0),typeof o=="function"&&(l=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const u={type:t,data:s,options:o};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),l&&this.once("flush",l),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},o=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():t()}):this.upgrading?o():t()),this}_onError(t){if(vr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),jc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=Oa.indexOf(this._offlineEventListener);o!==-1&&Oa.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}vr.protocol=By;class mk extends vr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{o||(s.send([{type:"ping",data:"probe"}]),s.once("packet",v=>{if(!o)if(v.type==="pong"&&v.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;vr.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(y(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const k=new Error("probe error");k.transport=s.name,this.emitReserved("upgradeError",k)}}))};function u(){o||(o=!0,y(),s.close(),s=null)}const d=v=>{const k=new Error("probe error: "+v);k.transport=s.name,u(),this.emitReserved("upgradeError",k)};function h(){d("transport closed")}function p(){d("socket closed")}function m(v){s&&v.name!==s.name&&u()}const y=()=>{s.removeListener("open",l),s.removeListener("error",d),s.removeListener("close",h),this.off("close",p),this.off("upgrading",m)};s.once("open",l),s.once("error",d),s.once("close",h),this.once("close",p),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{o||s.open()},200):s.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const s=[];for(let o=0;ock[u]).filter(u=>!!u)),super(o?l:t,l)}};function yk(r,t="",s){let o=r;s=s||typeof location<"u"&&location,r==null&&(r=s.protocol+"//"+s.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=s.protocol+r:r=s.host+r),/^(https?|wss?):\/\//.test(r)||(typeof s<"u"?r=s.protocol+"//"+r:r="https://"+r),o=Dc(r)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const u=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+u+":"+o.port+t,o.href=o.protocol+"://"+u+(s&&s.port===o.port?"":":"+o.port),o}const vk=typeof ArrayBuffer=="function",wk=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,Qy=Object.prototype.toString,xk=typeof Blob=="function"||typeof Blob<"u"&&Qy.call(Blob)==="[object BlobConstructor]",Ek=typeof File=="function"||typeof File<"u"&&Qy.call(File)==="[object FileConstructor]";function hd(r){return vk&&(r instanceof ArrayBuffer||wk(r))||xk&&r instanceof Blob||Ek&&r instanceof File}function La(r,t){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let s=0,o=r.length;s=0&&r.numthis.opts.maxAttachments)throw new Error("too many attachments");o.attachments=h}if(t.charAt(s+1)==="/"){const u=s+1;for(;++s&&!(t.charAt(s)===","||s===t.length););o.nsp=t.substring(u,s)}else o.nsp="/";const l=t.charAt(s+1);if(l!==""&&Number(l)==l){const u=s+1;for(;++s;){const d=t.charAt(s);if(d==null||Number(d)!=d){--s;break}if(s===t.length)break}o.id=Number(t.substring(u,s+1))}if(t.charAt(++s)){const u=this.tryParse(t.substr(s));if(pd.isPayloadValid(o.type,u))o.data=u;else throw new Error("invalid payload")}return o}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,s){switch(t){case Ne.CONNECT:return Pm(s);case Ne.DISCONNECT:return s===void 0;case Ne.CONNECT_ERROR:return typeof s=="string"||Pm(s);case Ne.EVENT:case Ne.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&bk.indexOf(s[0])===-1);case Ne.ACK:case Ne.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ck{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const s=Sk(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Rk=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};function Pm(r){return Object.prototype.toString.call(r)==="[object Object]"}const Tk=Object.freeze(Object.defineProperty({__proto__:null,Decoder:pd,Encoder:kk,get PacketType(){return Ne}},Symbol.toStringTag,{value:"Module"}));function un(r,t,s){return r.on(t,s),function(){r.off(t,s)}}const Pk=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Ky extends Ye{constructor(t,s,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[un(t,"open",this.onopen.bind(this)),un(t,"packet",this.onpacket.bind(this)),un(t,"error",this.onerror.bind(this)),un(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...s){var o,l,u;if(Pk.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(s.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const d={type:Ne.EVENT,data:s};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const y=this.ids++,v=s.pop();this._registerAckCallback(y,v),d.id=y}const h=(l=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||l===void 0?void 0:l.writable,p=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!h||(p?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(t,s){var o;const l=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(l===void 0){this.acks[t]=s;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let h=0;h{this.io.clearTimeoutFn(u),s.apply(this,h)};d.withError=!0,this.acks[t]=d}emitWithAck(t,...s){return new Promise((o,l)=>{const u=(d,h)=>d?l(d):o(h);u.withError=!0,s.push(u),this.emit(t,...s)})}_addToQueue(t){let s;typeof t[t.length-1]=="function"&&(s=t.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((l,...u)=>(this._queue[0],l!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(l)):(this._queue.shift(),s&&s(null,...u)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ne.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(o=>String(o.id)===t)){const o=this.acks[t];delete this.acks[t],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ne.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ne.EVENT:case Ne.BINARY_EVENT:this.onevent(t);break;case Ne.ACK:case Ne.BINARY_ACK:this.onack(t);break;case Ne.DISCONNECT:this.ondisconnect();break;case Ne.CONNECT_ERROR:this.destroy();const o=new Error(t.data.message);o.data=t.data.data,this.emitReserved("connect_error",o);break}}onevent(t){const s=t.data||[];t.id!=null&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const o of s)o.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const s=this;let o=!1;return function(...l){o||(o=!0,s.packet({type:Ne.ACK,id:t,data:l}))}}onack(t){const s=this.acks[t.id];typeof s=="function"&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ne.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const s=this._anyListeners;for(let o=0;o0&&r.jitter<=1?r.jitter:0,this.attempts=0}Ws.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*r);r=(Math.floor(t*10)&1)==0?r-s:r+s}return Math.min(r,this.max)|0};Ws.prototype.reset=function(){this.attempts=0};Ws.prototype.setMin=function(r){this.ms=r};Ws.prototype.setMax=function(r){this.max=r};Ws.prototype.setJitter=function(r){this.jitter=r};class Fc extends Ye{constructor(t,s){var o;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(s=t,t=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,Ga(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((o=s.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Ws({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=t;const l=s.parser||Tk;this.encoder=new l.Encoder,this.decoder=new l.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var s;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(s=this.backoff)===null||s===void 0||s.setMin(t),this)}randomizationFactor(t){var s;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(s=this.backoff)===null||s===void 0||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(s=this.backoff)===null||s===void 0||s.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new gk(this.uri,this.opts);const s=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const l=un(s,"open",function(){o.onopen(),t&&t()}),u=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),t?t(h):this.maybeReconnectOnOpen()},d=un(s,"error",u);if(this._timeout!==!1){const h=this._timeout,p=this.setTimeoutFn(()=>{l(),u(new Error("timeout")),s.close()},h);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(l),this.subs.push(d),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(un(t,"ping",this.onping.bind(this)),un(t,"data",this.ondata.bind(this)),un(t,"error",this.onerror.bind(this)),un(t,"close",this.onclose.bind(this)),un(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(s){this.onclose("parse error",s)}}ondecoded(t){Ka(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let o=this.nsps[t];return o?this._autoConnect&&!o.active&&o.connect():(o=new Ky(this,t,s),this.nsps[t]=o),o}_destroy(t){const s=Object.keys(this.nsps);for(const o of s)if(this.nsps[o].active)return;this._close()}_packet(t){const s=this.encoder.encode(t);for(let o=0;ot()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,s){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(l=>{l?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",l)):t.onreconnect()}))},s);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Io={};function Da(r,t){typeof r=="object"&&(t=r,r=void 0),t=t||{};const s=yk(r,t.path||"/socket.io"),o=s.source,l=s.id,u=s.path,d=Io[l]&&u in Io[l].nsps,h=t.forceNew||t["force new connection"]||t.multiplex===!1||d;let p;return h?p=new Fc(o,t):(Io[l]||(Io[l]=new Fc(o,t)),p=Io[l]),s.query&&!t.query&&(t.query=s.queryKey),p.socket(s.path,t)}Object.assign(Da,{Manager:Fc,Socket:Ky,io:Da,connect:Da});const Ak=250;function Am(r,t){var s;const o=(s=r.token)!==null&&s!==void 0?s:Kr(),l={app_id:r.appId,token:o};o||(l.anonymous_id=ud());const u=Da(r.serverUrl,{path:r.mountPath,transports:r.transports,query:l});return u.on("connect",async()=>{var d;return console.log("connect",u.id),(d=t.connect)===null||d===void 0?void 0:d.call(t)}),u.on("update_model",async d=>{var h;return(h=t.update_model)===null||h===void 0?void 0:h.call(t,d)}),u.on("error",async d=>{var h;return(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u.on("connect_error",async d=>{var h;return console.error("connect_error",d),(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u}function Nk({config:r}){let t={...r};const s={},o={},l={connect:async()=>{const _=[];Object.keys(s).forEach(D=>{const N=k(D);N.length!==0&&(m(D),N.forEach(({connect:L})=>{const q=async()=>L==null?void 0:L();_.push(q())}))}),await Promise.all(_)},update_model:async _=>{const N=k(_.room).map(L=>{var q;return(q=L.update_model)===null||q===void 0?void 0:q.call(L,_)});await Promise.all(N)},error:async _=>{console.error("error",_);const D=Object.values(s).flat().map(N=>{var L;return(L=N.error)===null||L===void 0?void 0:L.call(N,_)});await Promise.all(D)}};let u=Am(r,l);function d(){h()}function h(){F(),u&&u.disconnect()}function p(_){d(),t={...t,..._},u=Am(t,l)}function m(_){u.emit("join",_)}function y(_){u.emit("leave",_)}async function v(_,D){var N;const L=JSON.stringify(D);return(N=l.update_model)===null||N===void 0?void 0:N.call(l,{room:_,data:L})}function k(_){var D;return(D=s[_])!==null&&D!==void 0?D:[]}function O(_){const D=o[_];D&&(clearTimeout(D),delete o[_])}function F(){Object.keys(o).forEach(_=>{var D,N;clearTimeout(o[_]),delete o[_],((N=(D=s[_])===null||D===void 0?void 0:D.length)!==null&&N!==void 0?N:0)===0&&delete s[_]})}function S(_){O(_),o[_]=setTimeout(()=>{var D,N;delete o[_],!(((N=(D=s[_])===null||D===void 0?void 0:D.length)!==null&&N!==void 0?N:0)>0)&&(y(_),delete s[_])},Ak)}return{socket:u,subscribeToRoom:(_,D)=>{s[_]?O(_):(m(_),s[_]=[]),s[_].push(D);let N=!1;return()=>{var L,q;N||(N=!0,s[_]=(q=(L=s[_])===null||L===void 0?void 0:L.filter($=>$!==D))!==null&&q!==void 0?q:[],s[_].length===0&&S(_))}},updateConfig:p,updateModel:v,disconnect:h}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var Gy=class extends Event{constructor(t,s){super("error",s);De(this,"message");De(this,"error");this.message=t.message,this.error=t}},Yy=class extends Event{constructor(t=1e3,s="",o){super("close",o);De(this,"code");De(this,"reason");De(this,"wasClean",!0);this.code=t,this.reason=s}},oc={Event,ErrorEvent:Gy,CloseEvent:Yy};function Ok(r,t){if(!r)throw new Error(t)}function Lk(r){return new r.constructor(r.type,r)}function Dk(r){return"data"in r?new MessageEvent(r.type,r):"code"in r||"reason"in r?new Yy(r.code||1999,r.reason||"unknown reason",r):"error"in r?new Gy(r.error,r):new Event(r.type,r)}var Hm,jk=typeof process<"u"&&typeof((Hm=process.versions)==null?void 0:Hm.node)<"u"&&typeof document>"u",ka=jk?Dk:Lk,Dr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},Nm=!1,Ik=class jr extends EventTarget{constructor(s,o,l={}){super();De(this,"_ws");De(this,"_retryCount",-1);De(this,"_uptimeTimeout");De(this,"_connectTimeout");De(this,"_shouldReconnect",!0);De(this,"_connectLock",!1);De(this,"_binaryType","blob");De(this,"_closeCalled",!1);De(this,"_messageQueue",[]);De(this,"_url");De(this,"_protocols");De(this,"_options");De(this,"onclose",null);De(this,"onerror",null);De(this,"onmessage",null);De(this,"onopen",null);De(this,"_handleOpen",s=>{this._debug("open event");const{minUptime:o=Dr.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),o),Ok(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(l=>{var u;return(u=this._ws)==null?void 0:u.send(l)}),this._messageQueue=[],this.onopen&&this.onopen(s),this.dispatchEvent(ka(s))});De(this,"_handleMessage",s=>{this._debug("message event"),this.onmessage&&this.onmessage(s),this.dispatchEvent(ka(s))});De(this,"_handleError",s=>{this._debug("error event",s.message),this._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(s),this._debug("exec error listeners"),this.dispatchEvent(ka(s)),this._connect()});De(this,"_handleClose",s=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(s),this.dispatchEvent(ka(s))});this._url=s,this._protocols=o,this._options=l,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return jr.CONNECTING}get OPEN(){return jr.OPEN}get CLOSING(){return jr.CLOSING}get CLOSED(){return jr.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(s){this._binaryType=s,this._ws&&(this._ws.binaryType=s)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((o,l)=>(typeof l=="string"?o+=l.length:l instanceof Blob?o+=l.size:o+=l.byteLength,o),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?jr.CLOSED:jr.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(s=1e3,o){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(s,o)}reconnect(s,o){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(s,o),this._connect())}send(s){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",s),this._ws.send(s);else{const{maxEnqueuedMessages:o=Dr.maxEnqueuedMessages}=this._options;this._messageQueue.length",...s])}_getNextDelay(){const{reconnectionDelayGrowFactor:s=Dr.reconnectionDelayGrowFactor,minReconnectionDelay:o=Dr.minReconnectionDelay,maxReconnectionDelay:l=Dr.maxReconnectionDelay}=this._options;let u=0;return this._retryCount>0&&(u=o*Math.pow(s,this._retryCount-1),u>l&&(u=l)),this._debug("next delay",u),u}_wait(){return new Promise(s=>{setTimeout(s,this._getNextDelay())})}_getNextProtocols(s){if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(typeof s=="function"){const o=s();if(!o)return Promise.resolve(null);if(typeof o=="string"||Array.isArray(o))return Promise.resolve(o);if(o.then)return o}throw Error("Invalid protocols")}_getNextUrl(s){if(typeof s=="string")return Promise.resolve(s);if(typeof s=="function"){const o=s();if(typeof o=="string")return Promise.resolve(o);if(o.then)return o}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:s=Dr.maxRetries,connectionTimeout:o=Dr.connectionTimeout}=this._options;if(this._retryCount>=s){this._debug("max retries reached",this._retryCount,">=",s);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([l,u])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!Nm&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),Nm=!0);const d=this._options.WebSocket||WebSocket;this._debug("connect",{url:l,protocols:u}),this._ws=u?new d(l,u):new d(l),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),o)}).catch(l=>{this._connectLock=!1,this._handleError(new oc.ErrorEvent(Error(l.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new oc.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(s=1e3,o){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(s,o),this._handleClose(new oc.CloseEvent(s,o,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var Mk=r=>r[1]!==null&&r[1]!==void 0;function Fk(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let r=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){let o=Math.random()*16;return r>0?(o=(r+o)%16|0,r=Math.floor(r/16)):(o=(t+o)%16|0,t=Math.floor(t/16)),(s==="x"?o:o&3|8).toString(16)})}function Xy(r,t,s={}){const{host:o,path:l,protocol:u,room:d,party:h,query:p}=r;let m=o.replace(/^(http|https|ws|wss):\/\//,"");if(m.endsWith("/")&&(m=m.slice(0,-1)),l&&l.startsWith("/"))throw new Error("path must not start with a slash");const y=h??"main",v=l?`/${l}`:"",k=u||(m.startsWith("localhost:")||m.startsWith("127.0.0.1:")||m.startsWith("192.168.")||m.startsWith("10.")||m.startsWith("172.")&&m.split(".")[1]>="16"&&m.split(".")[1]<="31"||m.startsWith("[::ffff:7f00:1]:")?t:t+"s"),O=`${k}://${m}/${h?`parties/${h}`:"party"}/${d}${v}`,F=(x={})=>`${O}?${new URLSearchParams([...Object.entries(s),...Object.entries(x).filter(Mk)])}`,S=typeof p=="function"?async()=>F(await p()):F(p);return{host:m,path:v,room:d,name:y,protocol:k,partyUrl:O,urlProvider:S}}var Uk=class extends Ik{constructor(t){const s=Om(t);super(s.urlProvider,s.protocols,s.socketOptions);De(this,"_pk");De(this,"_pkurl");De(this,"name");De(this,"room");De(this,"host");De(this,"path");this.partySocketOptions=t,this.setWSProperties(s)}updateProperties(t){const s=Om({...t,host:t.host??this.host,room:t.room??this.room,path:t.path??this.path});this._url=s.urlProvider,this._protocols=s.protocols,this._options=s.socketOptions,this.setWSProperties(s)}setWSProperties(t){const{_pk:s,_pkurl:o,name:l,room:u,host:d,path:h}=t;this._pk=s,this._pkurl=o,this.name=l,this.room=u,this.host=d,this.path=h}reconnect(t,s){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(t,s)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(t,s){const o=Xy(t,"http"),l=typeof o.urlProvider=="string"?o.urlProvider:await o.urlProvider();return(t.fetch??fetch)(l,s)}};function Om(r){const{id:t,host:s,path:o,party:l,room:u,protocol:d,query:h,protocols:p,...m}=r,y=t||Fk(),v=Xy(r,"ws",{_pk:y});return{_pk:y,_pkurl:v.partyUrl,name:v.name,room:v.room,host:v.host,path:v.path,protocols:p,socketOptions:m,urlProvider:v.urlProvider}}const zk=1e3,Bk=3e3;class $k{constructor(t,s,o,l,u){var d;this.onClose=u,this.listeners=new Set,this.heartbeat=null,this.id=(d=l==null?void 0:l.id)!==null&&d!==void 0?d:crypto.randomUUID();const h=new Uk({host:o.host,party:t,room:s,id:this.id,query:()=>{const y=o.getAuthToken();return{app_id:o.appId,handler:t,...y?{token:y}:{},...o.functionsVersion?{fv:o.functionsVersion}:{}}}});this.ws=h;let p=Date.now();const m=()=>{p=Date.now()};h.addEventListener("open",m),h.addEventListener("message",y=>{m();let v;try{v=JSON.parse(y.data)}catch{return}if((v&&typeof v=="object"?v.type:void 0)!=="__pong")for(const O of this.listeners)O(v)}),this.heartbeat=setInterval(()=>{if(Date.now()-p>Bk){m(),h.reconnect();return}try{h.send(JSON.stringify({type:"__ping"}))}catch{}},zk)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.ws.send(JSON.stringify(t))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function Vk(r,t,s,o){let l=null;return{connect(u){if(l)return l;const d=new $k(r,t,s,u,()=>{o.delete(d),l===d&&(l=null)});return l=d,o.add(d),d}}}function qk(r,t){return r&&!r.startsWith("/")?r:t??r}function Hk(r){const t=new Set;return{module:new Proxy({},{get(o,l){if(!(typeof l!="string"||l==="then"))return u=>Vk(l,u,r,t)}}),closeAll:()=>{for(const o of[...t])o.close()}}}function Wk(r){var t,s,o;const{serverUrl:l="https://base44.app",appId:u,token:d,serviceToken:h,requiresAuth:p=!1,appBaseUrl:m,options:y,functionsVersion:v,headers:k}=r,O=typeof m=="string"?m:"",F={serverUrl:l,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:u,token:d};let S=null;const x=()=>(S||(S=Nk({config:F})),S),_={...k,"X-App-Id":String(u)},D=v?{..._,"Base44-Functions-Version":v}:_,N=Uo({baseURL:`${l}/api`,headers:_,token:d,onError:y==null?void 0:y.onError}),L=Uo({baseURL:`${l}/api`,headers:D,token:d,interceptResponses:!1,onError:y==null?void 0:y.onError}),q={..._,...d?{"on-behalf-of":`Bearer ${d}`}:{}},$=Uo({baseURL:`${l}/api`,headers:q,token:h,onError:y==null?void 0:y.onError}),G=Uo({baseURL:`${l}/api`,headers:D,token:h,interceptResponses:!1}),B=Nb(N,L,u,{appBaseUrl:O});if(typeof window<"u"){const xe=d||Kr();xe&&B.setToken(xe)}const ie=Hk({appId:u,host:qk(l,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:v,getAuthToken:()=>d||Kr()}),ue={entities:wm({axios:N,appId:u,getSocket:x}),integrations:xm(N,u),connectors:Db(N,u),auth:B,functions:Em(L,u,{getAuthHeaders:()=>{const xe={},J=d||Kr();return J&&(xe.Authorization=`Bearer ${J}`),xe},baseURL:(s=L.defaults)===null||s===void 0?void 0:s.baseURL}),agents:_m({axios:N,getSocket:x,appId:u,serverUrl:l,token:d}),aiGateway:Sm({serverUrl:l,token:d,appId:u}),appLogs:bm(N,u),users:Ib(N,u),analytics:yb({axiosClient:N,serverUrl:l,appId:u,userAuthModule:B}),actors:ie.module,cleanup:()=>{ue.analytics.cleanup(),ie.closeAll(),S&&S.disconnect()}},Ee={entities:wm({axios:$,appId:u,getSocket:x}),integrations:xm($,u),sso:Ob($,u),connectors:Lb($,u),functions:Em(G,u,{getAuthHeaders:()=>{const xe={};return h&&(xe.Authorization=`Bearer ${h}`),xe},baseURL:(o=G.defaults)===null||o===void 0?void 0:o.baseURL}),agents:_m({axios:$,getSocket:x,appId:u,serverUrl:l,token:d}),aiGateway:Sm({serverUrl:l,token:h,appId:u}),appLogs:bm($,u),cleanup:()=>{S&&S.disconnect()}};return p&&typeof window<"u"&&setTimeout(async()=>{try{await ue.auth.isAuthenticated()||ue.auth.redirectToLogin(window.location.href)}catch(xe){console.error("Authentication check failed:",xe),ue.auth.redirectToLogin(window.location.href)}},0),{...ue,setToken(xe){ue.auth.setToken(xe),S&&S.updateConfig({token:xe}),F.token=xe},getConfig(){return{serverUrl:l,appId:u,requiresAuth:p}},get asServiceRole(){if(!h)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return Ee}}}const Jy=typeof window>"u",Qk=Jy?{localStorage:new Map}:window,qo=Qk.localStorage,Kk=r=>r.replace(/([A-Z])/g,"_$1").toLowerCase(),Cs=(r,{defaultValue:t=void 0,removeFromUrl:s=!1}={})=>{if(Jy)return t;const o=`base44_${Kk(r)}`,l=new URLSearchParams(window.location.search),u=l.get(r);if(s){l.delete(r);const h=`${window.location.pathname}${l.toString()?`?${l.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}if(u)return qo.setItem(o,u),u;if(t)return qo.setItem(o,t),t;const d=qo.getItem(o);return d||null},Gk=()=>(Cs("clear_access_token")==="true"&&(qo.removeItem("base44_access_token"),qo.removeItem("token")),{appId:Cs("app_id",{defaultValue:"6a7cc97979a2417c63a73f95"}),token:Cs("access_token",{removeFromUrl:!0}),fromUrl:Cs("from_url",{defaultValue:window.location.href}),functionsVersion:Cs("functions_version",{defaultValue:"prod"}),appBaseUrl:Cs("app_base_url",{defaultValue:void 0})}),Bo={...Gk()},{appId:Yk,token:Xk,functionsVersion:Jk,appBaseUrl:Zk}=Bo,$o=Wk({appId:Yk,token:Xk,functionsVersion:Jk,serverUrl:"",requiresAuth:!1,appBaseUrl:Zk});function eC({}){var l;const t=td().pathname.substring(1),{data:s,isFetched:o}=mE({queryKey:["user"],queryFn:async()=>{try{return{user:await $o.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return w.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:w.jsx("div",{className:"max-w-md w-full",children:w.jsxs("div",{className:"text-center space-y-6",children:[w.jsxs("div",{className:"space-y-2",children:[w.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),w.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),w.jsxs("div",{className:"space-y-3",children:[w.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),w.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",w.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),o&&s.isAuthenticated&&((l=s.user)==null?void 0:l.role)==="admin"&&w.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:w.jsxs("div",{className:"flex items-start space-x-3",children:[w.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:w.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),w.jsxs("div",{className:"text-left space-y-1",children:[w.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),w.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),w.jsx("div",{className:"pt-6",children:w.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[w.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const Zy=R.createContext(),tC=({children:r})=>{const[t,s]=R.useState(null),[o,l]=R.useState(!1),[u,d]=R.useState(!0),[h,p]=R.useState(!0),[m,y]=R.useState(null),[v,k]=R.useState(!1),[O,F]=R.useState(null);R.useEffect(()=>{S()},[]);const S=async()=>{var N,L;try{p(!0),y(null);const q=Uo({baseURL:"/api/apps/public",headers:{"X-App-Id":Bo.appId},token:Bo.token,interceptResponses:!0});try{const $=await q.get(`/prod/public-settings/by-id/${Bo.appId}`);F($),Bo.token?await x():(d(!1),l(!1),k(!0)),p(!1)}catch($){if(console.error("App state check failed:",$),$.status===403&&((L=(N=$.data)==null?void 0:N.extra_data)!=null&&L.reason)){const G=$.data.extra_data.reason;y(G==="auth_required"?{type:"auth_required",message:"Authentication required"}:G==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:G,message:$.message})}else y({type:"unknown",message:$.message||"Failed to load app"});p(!1),d(!1)}}catch(q){console.error("Unexpected error:",q),y({type:"unknown",message:q.message||"An unexpected error occurred"}),p(!1),d(!1)}},x=async()=>{try{d(!0);const N=await $o.auth.me();s(N),l(!0),d(!1),k(!0)}catch(N){console.error("User auth check failed:",N),d(!1),l(!1),k(!0),(N.status===401||N.status===403)&&y({type:"auth_required",message:"Authentication required"})}},_=(N=!0)=>{s(null),l(!1),N?$o.auth.logout(window.location.href):$o.auth.logout()},D=()=>{$o.auth.redirectToLogin(window.location.href)};return w.jsx(Zy.Provider,{value:{user:t,isAuthenticated:o,isLoadingAuth:u,isLoadingPublicSettings:h,authError:m,appPublicSettings:O,authChecked:v,logout:_,navigateToLogin:D,checkUserAuth:x,checkAppState:S},children:r})},nC=()=>{const r=R.useContext(Zy);if(!r)throw new Error("useAuth must be used within an AuthProvider");return r},rC=()=>w.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:w.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:w.jsxs("div",{className:"text-center",children:[w.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:w.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),w.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),w.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),w.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[w.jsx("p",{children:"If you believe this is an error, you can:"}),w.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[w.jsx("li",{children:"Verify you are logged in with the correct account"}),w.jsx("li",{children:"Contact the app administrator for access"}),w.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),sC=r=>{const t=r.slice(1);try{return decodeURIComponent(t)}catch{return t}};function oC(){const{pathname:r,hash:t}=td(),s=BE();return R.useEffect(()=>{if(s!=="POP"){if(t){const o=sC(t),l=window.setTimeout(()=>{var u;(u=document.getElementById(o))==null||u.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(l)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[r,t,s]),null}const Lm=[{label:"About",href:"#about"},{label:"Businesses",href:"#businesses"},{label:"News & Media",href:"#news",active:!0},{label:"Investor Relations",href:"#ir"},{label:"Sustainability",href:"#sustainability"},{label:"Contact",href:"#contact"}];function iC(){const[r,t]=R.useState(!1);return w.jsxs("header",{className:"site-header sticky top-0 z-50 bg-white border-b border-[#8D0034]/15",children:[w.jsx("div",{className:"mx-auto max-w-[1280px] px-5 md:px-10",children:w.jsxs("div",{className:"flex h-[68px] lg:h-[84px] items-center justify-between",children:[w.jsxs("a",{href:"/",className:"flex items-baseline gap-2","aria-label":"Alrazah Q.P.S.C. home",children:[w.jsx("span",{className:"font-heading text-[22px] lg:text-[26px] font-700 tracking-tight text-[#1A1A1A]",children:"ALRAZAH"}),w.jsx("span",{className:"text-[10px] lg:text-[11px] font-600 tracking-[0.2em] text-[#8D0034] uppercase",children:"Q.P.S.C."})]}),w.jsx("nav",{className:"hidden lg:flex items-center gap-8","aria-label":"Primary",children:Lm.map(s=>w.jsx("a",{href:s.href,className:"text-[13px] font-500 tracking-wide transition-colors duration-200 "+(s.active?"text-[#8D0034]":"text-[#1A1A1A] hover:text-[#8D0034]"),children:s.label},s.label))}),w.jsx("button",{className:"lg:hidden inline-flex items-center justify-center w-11 h-11 -mr-2 text-[#1A1A1A]",onClick:()=>t(s=>!s),"aria-label":r?"Close menu":"Open menu","aria-expanded":r,children:r?w.jsx(bg,{size:22}):w.jsx(Lx,{size:22})})]})}),r&&w.jsx("div",{className:"lg:hidden border-t border-[#8D0034]/15 bg-white",children:w.jsx("nav",{className:"mx-auto max-w-[1280px] px-5 py-4 flex flex-col","aria-label":"Mobile",children:Lm.map(s=>w.jsx("a",{href:s.href,onClick:()=>t(!1),className:"py-3 text-[15px] font-500 border-b border-[#8D0034]/10 "+(s.active?"text-[#8D0034]":"text-[#1A1A1A]"),children:s.label},s.label))})})]})}const aC=[{title:"Company",links:["About Alrazah","Leadership","Our Heritage","Governance","Careers"]},{title:"Businesses",links:["Alrazah Exchange","Bullion & Precious Metals","Investments","Partnerships"]},{title:"News & Media",links:["Press Releases","Media Centre","Publications","Media Contacts"]},{title:"Legal",links:["Terms of Use","Privacy Policy","Cookie Policy","Regulatory Disclosures"]}];function lC(){return w.jsxs("footer",{className:"site-footer bg-[#111111] text-white",children:[w.jsx("div",{className:"h-1 w-full bg-[#8D0034]"}),w.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 md:px-10 py-16 md:py-20",children:[w.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-10",children:[w.jsxs("div",{className:"col-span-2 lg:col-span-2",children:[w.jsxs("div",{className:"flex items-baseline gap-2",children:[w.jsx("span",{className:"font-heading text-[24px] font-700",children:"ALRAZAH"}),w.jsx("span",{className:"text-[11px] font-600 tracking-[0.2em] text-white/70 uppercase",children:"Q.P.S.C."})]}),w.jsx("p",{className:"mt-5 text-[13px] leading-[1.7] text-white/60 max-w-[300px]",children:"Alrazah Q.P.S.C. is a Qatari corporate group operating across exchange, bullion and precious-metals markets, serving investors, institutions and the wider public."}),w.jsxs("p",{className:"mt-5 text-[12px] text-white/45 leading-[1.7]",children:["Doha, Qatar",w.jsx("br",{}),w.jsx("a",{href:"mailto:info@qprimeholding.com",className:"hover:text-white transition-colors",children:"info@qprimeholding.com"})]})]}),aC.map(r=>w.jsxs("div",{children:[w.jsx("h3",{className:"text-[11px] font-700 tracking-[1.4px] uppercase text-white/90",children:r.title}),w.jsx("ul",{className:"mt-5 space-y-3",children:r.links.map(t=>w.jsx("li",{children:w.jsx("a",{href:"#",className:"text-[13px] text-white/55 hover:text-white transition-colors duration-200",children:t})},t))})]},r.title))]}),w.jsxs("div",{className:"mt-16 pt-8 border-t border-white/10 flex flex-col md:flex-row items-start md:items-center justify-between gap-4",children:[w.jsxs("p",{className:"text-[12px] text-white/45",children:["© ",new Date().getFullYear()," Alrazah Q.P.S.C. All rights reserved."]}),w.jsx("p",{className:"text-[11px] tracking-[0.1em] uppercase text-white/35",children:"Listed on the Qatar Stock Exchange"})]})]})]})}function uC({items:r}){return w.jsx("nav",{className:"breadcrumb-nav bg-white border-b border-[#8D0034]/12","aria-label":"Breadcrumb",children:w.jsx("div",{className:"mx-auto max-w-[1280px] px-5 md:px-10 py-[18px] md:py-[22px]",children:w.jsxs("ol",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-[12px] md:text-[13px] font-500",children:[w.jsx("li",{children:w.jsxs("a",{href:"/",className:"flex items-center gap-1 text-[#666666] hover:text-[#8D0034] transition-colors",children:[w.jsx(kx,{size:13,className:"opacity-70"}),w.jsx("span",{children:"Home"})]})}),r.map((t,s)=>{const o=s===r.length-1;return w.jsxs("li",{className:"flex items-center gap-2",children:[w.jsx(Ex,{size:13,className:"text-[#8D0034]/40"}),o||!t.href?w.jsx("span",{className:"text-[#8D0034] font-600","aria-current":"page",children:t.label}):w.jsx("a",{href:t.href,className:"text-[#666666] hover:text-[#8D0034] transition-colors",children:t.label})]},t.label)})]})})})}function cC({items:r,supporting:t}){return w.jsx("section",{className:"bg-[#8D0034]/[0.035] border-y border-[#8D0034]/12",children:w.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 md:px-10 py-12 md:py-16",children:[w.jsxs("div",{className:"max-w-[760px]",children:[w.jsx("h2",{className:"text-[11px] md:text-[12px] font-700 tracking-[1.6px] uppercase text-[#8D0034]",children:"Key Takeaways"}),w.jsx("p",{className:"mt-4 font-heading text-[20px] md:text-[24px] leading-[1.35] text-[#1A1A1A]",children:t})]}),w.jsx("div",{className:"mt-10 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 border-t border-[#8D0034]/15",children:r.map((s,o)=>w.jsxs("div",{className:"group px-6 py-8 transition-colors duration-200 hover:bg-[#8D0034]/[0.05] "+(ow.jsxs("div",{className:"px-6 py-8 md:py-10 "+(su.preventDefault(),o=async()=>{try{await navigator.clipboard.writeText(window.location.href),t(!0),setTimeout(()=>t(!1),2e3)}catch{}},l=[{label:"LinkedIn",icon:Px,href:"#",onClick:s},{label:"X",icon:Mx,href:"#",onClick:s},{label:"Facebook",icon:Sx,href:"#",onClick:s},{label:"Email",icon:Nx,href:"#",onClick:s}];return w.jsxs("div",{className:"article-utilities flex flex-wrap items-center gap-3",children:[w.jsx("span",{className:"text-[11px] font-700 tracking-[1.6px] uppercase text-[#8D0034] mr-2",children:"Share"}),l.map(u=>{const d=u.icon;return w.jsx("a",{href:u.href,onClick:u.onClick,"aria-label":`Share on ${u.label}`,className:"inline-flex items-center justify-center w-10 h-10 border border-[#8D0034]/20 text-[#666666] hover:bg-[#8D0034] hover:text-white hover:border-[#8D0034] transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#8D0034] focus-visible:ring-offset-2",children:w.jsx(d,{size:17})},u.label)}),w.jsx("button",{onClick:o,"aria-label":"Copy link",className:"inline-flex items-center justify-center w-10 h-10 border border-[#8D0034]/20 text-[#666666] hover:bg-[#8D0034] hover:text-white hover:border-[#8D0034] transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#8D0034] focus-visible:ring-offset-2",children:r?w.jsx(wx,{size:17}):w.jsx(Rx,{size:17})}),w.jsxs("button",{onClick:()=>window.print(),"aria-label":"Print this press release",className:"inline-flex items-center gap-2 h-10 px-4 border border-[#8D0034]/20 text-[13px] font-600 text-[#1A1A1A] hover:bg-[#8D0034] hover:text-white hover:border-[#8D0034] transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#8D0034] focus-visible:ring-offset-2 no-print",children:[w.jsx(jx,{size:16}),w.jsx("span",{children:"Print"})]})]})}function fC({releases:r}){return w.jsx("section",{className:"related-releases bg-[#F4F4F4] border-t border-[#8D0034]/12",children:w.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 md:px-10 py-16 md:py-20",children:[w.jsx("h2",{className:"text-[11px] md:text-[12px] font-700 tracking-[1.6px] uppercase text-[#8D0034]",children:"Related Press Releases"}),w.jsx("div",{className:"mt-8 grid grid-cols-1 md:grid-cols-3 gap-px bg-[#8D0034]/15 border border-[#8D0034]/15",children:r.map(t=>w.jsxs("a",{href:"#",className:"group flex flex-col bg-white p-7 md:p-8 hover:bg-[#8D0034]/[0.03] transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#8D0034] focus-visible:ring-inset",children:[w.jsxs("div",{className:"flex items-center gap-3 text-[11px] font-600 tracking-[1px] uppercase",children:[w.jsx("span",{className:"text-[#8D0034]",children:t.category}),w.jsx("span",{className:"text-[#8D0034]/30",children:"·"}),w.jsx("span",{className:"text-[#666666]",children:t.date})]}),w.jsx("h3",{className:"mt-4 font-heading text-[19px] md:text-[21px] leading-[1.3] font-700 text-[#1A1A1A] group-hover:text-[#8D0034] transition-colors",children:t.title}),w.jsx("p",{className:"mt-3 text-[13.5px] leading-[1.6] text-[#444] flex-1",children:t.excerpt}),w.jsxs("span",{className:"mt-5 inline-flex items-center gap-2 text-[12px] font-600 tracking-wide uppercase text-[#8D0034]",children:["Read release",w.jsx(yx,{size:15,className:"transition-transform duration-200 group-hover:translate-x-1"})]})]},t.title))})]})})}function hC(){return w.jsx("section",{className:"cta-band bg-[#8D0034] text-white",children:w.jsx("div",{className:"mx-auto max-w-[1280px] px-5 md:px-10 py-16 md:py-20",children:w.jsxs("div",{className:"max-w-[640px]",children:[w.jsx("h2",{className:"text-[12px] font-700 tracking-[1.8px] uppercase text-white/70",children:"Stay Informed"}),w.jsx("p",{className:"mt-5 font-heading text-[26px] md:text-[32px] leading-[1.25] font-600",children:"Follow Alrazah's latest corporate announcements, developments and institutional news."}),w.jsxs("div",{className:"mt-9 flex flex-col sm:flex-row gap-4",children:[w.jsx("a",{href:"#",className:"inline-flex items-center justify-center px-7 h-12 bg-white text-[#8D0034] text-[13px] font-700 tracking-wide uppercase hover:bg-white/90 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-offset-4 focus-visible:ring-offset-[#8D0034]",children:"View All Press Releases"}),w.jsx("a",{href:"#",className:"inline-flex items-center justify-center px-7 h-12 border border-white/60 text-white text-[13px] font-700 tracking-wide uppercase hover:bg-white/10 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-offset-4 focus-visible:ring-offset-[#8D0034]",children:"Contact Alrazah"})]})]})})})}const pC="https://media.base44.com/images/public/6a7cc97979a2417c63a73f95/6f49e03e6_generated_6aed2716.png",mC="https://media.base44.com/images/public/6a7cc97979a2417c63a73f95/9dca82872_generated_8a0a8936.png",gC="THE FUTURE OF GOLD IN QATAR: Alrazah Exchange and The Royal Mint Unveil the World’s Most Secure Bullion Bar, Featuring Over 1,100 Years of Heritage and Craftsmanship",yC=[{num:"01",title:"First Qatar showcase",desc:"The event marked the first showcase of the Britannia Gold Bullion Minted Bar Range of its kind in Qatar."},{num:"02",title:"International partnership",desc:"Alrazah Exchange unveiled the range in partnership with The Royal Mint, the UK’s official mint."},{num:"03",title:"Heritage and security",desc:"The range combines The Royal Mint’s more than 1,100-year heritage with advanced visual security features and precision craftsmanship."},{num:"04",title:"Qatar–UK commercial ties",desc:"The event highlighted deepening commercial relationships between Qatar and the United Kingdom."}],vC=[{num:"01",value:"1,100+ YEARS",desc:"The Royal Mint’s heritage"},{num:"02",value:"24 NOV 2025",desc:"Unveiling date"},{num:"03",value:"DOHA",desc:"Host city"},{num:"04",value:"QATAR",desc:"First showcase of its kind in the country"}],wC=[{date:"12 Sep 2025",category:"Press Release",title:"Alrazah Exchange Reports Strong Half-Year Performance Across Bullion and Exchange Operations",excerpt:"The group delivered sustained growth across its bullion and exchange businesses, reflecting disciplined execution and market confidence."},{date:"28 Aug 2025",category:"Press Release",title:"Alrazah Exchange Strengthens Governance with New Board Appointments",excerpt:"Two new board members join Alrazah Q.P.S.C., reinforcing the group’s commitment to robust corporate governance."},{date:"15 Jul 2025",category:"Press Release",title:"Alrazah Exchange Opens New Service Centre in Doha",excerpt:"The new centre expands Alrazah’s customer-facing presence and capacity across Qatar’s financial services market."}],xC=[{id:"overview",label:"01 — Overview"},{id:"unveiling",label:"02 — The unveiling"},{id:"leadership",label:"03 — Leadership perspectives"},{id:"security",label:"04 — Bullion security & craftsmanship"},{id:"qatar-uk",label:"05 — Qatar–UK relationship"}];function Rs({id:r,children:t}){return w.jsx("h2",{id:r,className:"scroll-mt-28 mt-14 mb-5 font-heading text-[24px] md:text-[28px] font-700 leading-[1.25] text-[#1A1A1A]",children:t})}function gn({children:r,lead:t}){return w.jsx("p",{className:"text-[16px] md:text-[17px] leading-[1.75] text-[#1A1A1A] "+(t?"text-[18px] md:text-[19px] leading-[1.65] font-500":""),children:r})}function ac(){return w.jsxs("div",{className:"min-h-screen bg-white",children:[w.jsx(iC,{}),w.jsx(uC,{items:[{label:"News & Media",href:"#"},{label:"Press Releases",href:"#"},{label:"The Future of Gold in Qatar"}]}),w.jsx("section",{className:"article-hero bg-[#8D0034] text-white",children:w.jsx("div",{className:"mx-auto max-w-[1280px] px-5 md:px-10 py-14 md:py-20 lg:py-24",children:w.jsxs("div",{className:"max-w-[1000px]",children:[w.jsx("div",{className:"text-[12px] font-700 tracking-[1.4px] uppercase text-white/85",children:"Press Release"}),w.jsx("h1",{className:"mt-5 md:mt-6 font-heading text-[30px] sm:text-[34px] md:text-[40px] lg:text-[48px] leading-[1.06] font-700 text-balance",children:gC}),w.jsx("time",{className:"block mt-6 md:mt-8 text-[14px] md:text-[15px] text-white/85",children:"24 November 2025"}),w.jsxs("div",{className:"mt-7 flex flex-wrap items-center gap-x-5 gap-y-2 text-[11px] font-700 tracking-[1.4px] uppercase text-white/80",children:[w.jsx("span",{children:"Doha · Qatar"}),w.jsx("span",{className:"hidden sm:inline-block w-px h-3 bg-white/30"}),w.jsx("span",{children:"Alrazah Exchange"})]})]})})}),w.jsx("div",{className:"mx-auto max-w-[1280px] px-5 md:px-10 pt-10 md:pt-14",children:w.jsxs("figure",{children:[w.jsx("div",{className:"overflow-hidden",children:w.jsx("img",{src:pC,alt:"The unveiling of the Britannia Gold Bullion Minted Bar Range at the British Embassy in Doha, attended by senior representatives of Alrazah Exchange and The Royal Mint.",className:"w-full aspect-[16/7] object-cover",loading:"eager"})}),w.jsx("figcaption",{className:"mt-3 text-[12px] text-[#666666] italic max-w-[760px]",children:"The Britannia Gold Bullion Minted Bar Range was unveiled at the British Embassy in Doha in partnership with The Royal Mint."})]})}),w.jsx(cC,{items:yC,supporting:"An international partnership bringing The Royal Mint’s Britannia Gold Bullion Minted Bar Range to customers in Qatar."}),w.jsx("div",{className:"mx-auto max-w-[1280px] px-5 md:px-10 py-14 md:py-20",children:w.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[minmax(0,1fr)_300px] gap-10 lg:gap-16",children:[w.jsxs("article",{className:"min-w-0 max-w-[760px]",children:[w.jsx(Rs,{id:"overview",children:"Overview"}),w.jsx(gn,{lead:!0,children:"Alrazah Exchange, in proud partnership with The Royal Mint, hosted an exclusive unveiling at the British Embassy in Doha to introduce the Britannia Gold Bullion Minted Bar Range to investors and collectors in Qatar. The occasion brought together senior representatives of both organisations, invited clients and members of the media, marking a significant moment in the country’s investment-gold market and in the commercial relationship between Qatar and the United Kingdom."}),w.jsx(Rs,{id:"unveiling",children:"The unveiling"}),w.jsx(gn,{children:"Held under the patronage of the British Embassy in Doha, the unveiling provided a formal setting befitting the stature of the institutions involved. Senior leadership from Alrazah Exchange and The Royal Mint addressed invited guests, outlining the significance of bringing the Britannia range to Qatar and the shared principles of quality, integrity and craftsmanship that underpin the partnership."}),w.jsx("div",{className:"mt-6",children:w.jsx(gn,{children:"The program included an introduction to The Royal Mint’s exceptional 1,100-year heritage of minting craftsmanship, tracing an unbroken lineage of precision and trust that ranks among the oldest continuing institutions of its kind. Guests were offered a closer view of the Britannia Gold Bullion Minted Bar Range and the advanced characteristics that distinguish it within the global bullion market."})}),w.jsx(Rs,{id:"leadership",children:"Leadership perspectives"}),w.jsx(gn,{children:"Addressing the gathering, senior leaders from both organisations reflected on the significance of the partnership and the shared values it represents for Qatar’s investors and collectors."}),w.jsx(ic,{quote:"This collaboration with The Royal Mint reflects our shared commitment to quality, integrity, and excellence. For more than five decades, Alrazah Exchange has stood for trust and innovation across Qatar’s financial and bullion markets. Through this partnership, we are delighted to offer internationally recognized, premium gold bullion solutions to investors and collectors in Qatar.",speaker:"Mr. Faisal Hamad T M Al-Thani",role:"President, Alrazah Exchange"}),w.jsx(gn,{children:"The Chief Executive Officer of Alrazah Exchange emphasised the importance of broadening access to internationally recognised bullion within the Qatari market."}),w.jsx(ic,{quote:"Bringing the Britannia Gold Bullion Minted Bar Range to Qatar represents an important step in broadening access to internationally recognized bullion for investors and collectors here. Our partnership with The Royal Mint reflects Alrazah Exchange’s enduring commitment to quality, and to serving our clients with products of the highest standard.",speaker:"Mr. Abdulaziz Ebrahim A M Al-Sehlawi",role:"Chief Executive Officer, Alrazah Exchange"}),w.jsx(Rs,{id:"security",children:"Bullion security & craftsmanship"}),w.jsx(gn,{children:"Designed for a new era of bullion investment security, the Britannia range incorporates advanced visual security features alongside the precision craftsmanship for which The Royal Mint is recognised. Each bar reflects a combination of heritage and innovation intended to meet the expectations of discerning investors and collectors."}),w.jsxs("figure",{className:"my-10",children:[w.jsx("img",{src:mC,alt:"Macro detail of a Britannia Gold Bullion Minted Bar, showing precision engraving and advanced visual security features.",className:"w-full aspect-[3/2] object-cover",loading:"lazy"}),w.jsx("figcaption",{className:"mt-3 text-[12px] text-[#666666] italic",children:"The Britannia range combines advanced visual security features with precision minting craftsmanship."})]}),w.jsx(dC,{facts:vC}),w.jsx(gn,{children:"The Chief Executive of The Royal Mint highlighted the significance of introducing the Britannia range to the Qatari market through a trusted local partner."}),w.jsx(ic,{quote:"The Royal Mint’s heritage spans more than 1,100 years of craftsmanship and trust, and we are proud to see the Britannia range introduced to investors in Qatar through this partnership with Alrazah Exchange. Together, we connect centuries of minting expertise with one of the region’s most established financial and bullion markets.",speaker:"Mrs. Anne Jessopp",role:"Chief Executive Officer, The Royal Mint"}),w.jsx(Rs,{id:"qatar-uk",children:"Qatar–UK commercial ties"}),w.jsx(gn,{children:"Following the formal presentations, guests were invited to view the range and to speak with representatives of both organisations. The event underscored the deepening commercial relationship between Qatar and the United Kingdom, with Alrazah Exchange serving as the local partner bringing an internationally recognised bullion product to the Qatari market."}),w.jsxs("section",{className:"my-12 md:my-14 border-y border-[#8D0034]/20 py-10 md:py-12",children:[w.jsx("h3",{className:"text-[11px] md:text-[12px] font-700 tracking-[1.6px] uppercase text-[#8D0034]",children:"A partnership built on heritage and trust"}),w.jsx("p",{className:"mt-4 font-heading text-[20px] md:text-[24px] leading-[1.4] text-[#1A1A1A] max-w-[680px]",children:"The unveiling brought together Alrazah Exchange and The Royal Mint around a shared focus on quality, integrity, craftsmanship and innovation, connecting Qatar’s investment-gold market with one of the world’s most recognized names in precious metals."})]}),w.jsx(Rs,{children:"A continuing relationship"}),w.jsx(gn,{children:"Renowned for its broad portfolio of precious metal investment solutions, The Royal Mint brings to the partnership a global reputation built over more than eleven centuries. The collaboration connects that heritage with Alrazah Exchange’s deep-rooted presence across Qatar’s financial and bullion markets."}),w.jsx("div",{className:"mt-6",children:w.jsx(gn,{children:"This week’s showcase further underscores Alrazah Exchange’s position as a leading distributor of bullion in Qatar, and its capacity to partner with globally recognised institutions in bringing premium products to investors and collectors. The collaboration with The Royal Mint reflects Alrazah Exchange’s continued commitment to trust, innovation and excellence across Qatar’s financial landscape."})}),w.jsxs("div",{className:"mt-14 pt-8 border-t border-[#8D0034]/20",children:[w.jsx("div",{className:"text-[12px] text-[#666666]",children:"Published 24 November 2025 · Alrazah Q.P.S.C. · Doha, Qatar"}),w.jsx("div",{className:"mt-6",children:w.jsx(Dm,{})})]})]}),w.jsx("aside",{className:"article-sidebar hidden lg:block",children:w.jsxs("div",{className:"sticky top-[108px] space-y-12",children:[w.jsxs("nav",{"aria-label":"On this page",children:[w.jsx("h3",{className:"text-[11px] font-700 tracking-[1.6px] uppercase text-[#8D0034]",children:"On this page"}),w.jsx("ul",{className:"mt-5 space-y-3 border-l border-[#8D0034]/15",children:xC.map(r=>w.jsx("li",{children:w.jsx("a",{href:`#${r.id}`,className:"block pl-4 -ml-px border-l border-transparent hover:border-[#8D0034] text-[13px] text-[#444] hover:text-[#8D0034] transition-colors py-1",children:r.label})},r.id))})]}),w.jsxs("div",{children:[w.jsx("h3",{className:"text-[11px] font-700 tracking-[1.6px] uppercase text-[#8D0034]",children:"Share"}),w.jsx("div",{className:"mt-5",children:w.jsx(Dm,{})})]})]})})]})}),w.jsx(fC,{releases:wC}),w.jsx(hC,{}),w.jsx(lC,{})]})}const EC=()=>{const{isLoadingAuth:r,isLoadingPublicSettings:t,authError:s,navigateToLogin:o}=nC();if(t||r)return w.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:w.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(s){if(s.type==="user_not_registered")return w.jsx(rC,{});if(s.type==="auth_required")return o(),null}return w.jsxs(n_,{children:[w.jsx(Fo,{path:"/",element:w.jsx(ac,{})}),w.jsx(Fo,{path:"/news-media/press-release/the-future-of-gold-in-qatar-alrazah-exchange-and-the-royal-mint-unveil-the-worlds-most-secure-bullion-bar",element:w.jsx(ac,{})}),w.jsx(Fo,{path:"/news-media/press-release/the-future-of-gold-in-qatar-alrazah-exchange-and-the-royal-mint-unveil-the-worlds-most-secure-bullion-bar/",element:w.jsx(ac,{})}),w.jsx(Fo,{path:"*",element:w.jsx(eC,{})})]})};function _C(){return w.jsx(tC,{children:w.jsxs(rE,{client:gE,children:[w.jsxs(o_,{children:[w.jsx(oC,{}),w.jsx(EC,{})]}),w.jsx(N1,{})]})})}aw.createRoot(document.getElementById("root")).render(w.jsx(_C,{}));